git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
isdn
/
hysdn
/
hysdn_proclog.c
diff --git
a/drivers/isdn/hysdn/hysdn_proclog.c
b/drivers/isdn/hysdn/hysdn_proclog.c
index
4211cd0
..
c4301e8
100644
(file)
--- a/
drivers/isdn/hysdn/hysdn_proclog.c
+++ b/
drivers/isdn/hysdn/hysdn_proclog.c
@@
-11,7
+11,6
@@
*/
#include <linux/module.h>
*/
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/pci.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/pci.h>
@@
-22,12
+21,14
@@
/* the proc subdir for the interface is defined in the procconf module */
extern struct proc_dir_entry *hysdn_proc_entry;
/* the proc subdir for the interface is defined in the procconf module */
extern struct proc_dir_entry *hysdn_proc_entry;
+static void put_log_buffer(hysdn_card * card, char *cp);
+
/*************************************************/
/* structure keeping ascii log for device output */
/*************************************************/
struct log_data {
struct log_data *next;
/*************************************************/
/* structure keeping ascii log for device output */
/*************************************************/
struct log_data {
struct log_data *next;
- u
long usage_cnt;
/* number of files still to work */
+ u
nsigned long usage_cnt;
/* number of files still to work */
void *proc_ctrl; /* pointer to own control procdata structure */
char log_start[2]; /* log string start (final len aligned by size) */
};
void *proc_ctrl; /* pointer to own control procdata structure */
char log_start[2]; /* log string start (final len aligned by size) */
};
@@
-41,7
+42,7
@@
struct procdata {
struct log_data *log_head, *log_tail; /* head and tail for queue */
int if_used; /* open count for interface */
int volatile del_lock; /* lock for delete operations */
struct log_data *log_head, *log_tail; /* head and tail for queue */
int if_used; /* open count for interface */
int volatile del_lock; /* lock for delete operations */
- uchar logtmp[LOG_MAX_LINELEN];
+ u
nsigned
char logtmp[LOG_MAX_LINELEN];
wait_queue_head_t rd_queue;
};
wait_queue_head_t rd_queue;
};
@@
-93,7
+94,7
@@
hysdn_addlog(hysdn_card * card, char *fmt,...)
/* opened for read got the contents. */
/* Flushes buffers not longer in use. */
/********************************************/
/* opened for read got the contents. */
/* Flushes buffers not longer in use. */
/********************************************/
-void
+
static
void
put_log_buffer(hysdn_card * card, char *cp)
{
struct log_data *ib;
put_log_buffer(hysdn_card * card, char *cp)
{
struct log_data *ib;
@@
-150,17
+151,14
@@
put_log_buffer(hysdn_card * card, char *cp)
/* write log file -> set log level bits */
/****************************************/
static ssize_t
/* write log file -> set log level bits */
/****************************************/
static ssize_t
-hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off)
+hysdn_log_write(struct file *file, const char
__user
*buf, size_t count, loff_t * off)
{
{
- ulong u = 0;
+ u
nsigned
long u = 0;
int found = 0;
int found = 0;
- uchar *cp, valbuf[128];
+ u
nsigned
char *cp, valbuf[128];
long base = 10;
hysdn_card *card = (hysdn_card *) file->private_data;
long base = 10;
hysdn_card *card = (hysdn_card *) file->private_data;
- if (&file->f_pos != off) /* fs error check */
- return (-ESPIPE);
-
if (count > (sizeof(valbuf) - 1))
count = sizeof(valbuf) - 1; /* limit length */
if (copy_from_user(valbuf, buf, count))
if (count > (sizeof(valbuf) - 1))
count = sizeof(valbuf) - 1; /* limit length */
if (copy_from_user(valbuf, buf, count))
@@
-203,7
+201,7
@@
hysdn_log_write(struct file *file, const char *buf, size_t count, loff_t * off)
/* read log file */
/******************/
static ssize_t
/* read log file */
/******************/
static ssize_t
-hysdn_log_read(struct file *file, char *buf, size_t count, loff_t * off)
+hysdn_log_read(struct file *file, char
__user
*buf, size_t count, loff_t * off)
{
struct log_data *inf;
int len;
{
struct log_data *inf;
int len;
@@
-237,7
+235,7
@@
hysdn_log_read(struct file *file, char *buf, size_t count, loff_t * off)
if ((len = strlen(inf->log_start)) <= count) {
if (copy_to_user(buf, inf->log_start, len))
return -EFAULT;
if ((len = strlen(inf->log_start)) <= count) {
if (copy_to_user(buf, inf->log_start, len))
return -EFAULT;
-
file->f_pos
+= len;
+
*off
+= len;
return (len);
}
return (0);
return (len);
}
return (0);
@@
-251,7
+249,7
@@
hysdn_log_open(struct inode *ino, struct file *filep)
{
hysdn_card *card;
struct procdata *pd = NULL;
{
hysdn_card *card;
struct procdata *pd = NULL;
- ulong flags;
+ u
nsigned
long flags;
lock_kernel();
card = card_root;
lock_kernel();
card = card_root;
@@
-285,7
+283,7
@@
hysdn_log_open(struct inode *ino, struct file *filep)
return (-EPERM); /* no permission this time */
}
unlock_kernel();
return (-EPERM); /* no permission this time */
}
unlock_kernel();
- return
(0
);
+ return
nonseekable_open(ino, filep
);
} /* hysdn_log_open */
/*******************************************************************************/
} /* hysdn_log_open */
/*******************************************************************************/