Commit 9a21b385 authored by Armin Schindler's avatar Armin Schindler Committed by Linus Torvalds

[PATCH] Eicon driver: add missing uaccess

This patch adds asm/uaccess.h to files which uses copy_to/from_user()
and adds the use of the drivers internal API call to copy_to/from_user()
in platform independent code.
Signed-off-by: default avatarArmin Schindler <armin@melware.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9217644a
/* $Id: divamnt.c,v 1.32.6.5 2004/08/28 20:03:53 armin Exp $ /* $Id: divamnt.c,v 1.32.6.9 2005/01/31 12:22:20 armin Exp $
* *
* Driver for Eicon DIVA Server ISDN cards. * Driver for Eicon DIVA Server ISDN cards.
* Maint module * Maint module
...@@ -18,13 +18,14 @@ ...@@ -18,13 +18,14 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#include "platform.h" #include "platform.h"
#include "di_defs.h" #include "di_defs.h"
#include "divasync.h" #include "divasync.h"
#include "debug_if.h" #include "debug_if.h"
static char *main_revision = "$Revision: 1.32.6.5 $"; static char *main_revision = "$Revision: 1.32.6.9 $";
static int major; static int major;
......
/* $Id: divasi.c,v 1.25 2003/09/09 06:46:29 schindler Exp $ /* $Id: divasi.c,v 1.25.6.2 2005/01/31 12:22:20 armin Exp $
* *
* Driver for Eicon DIVA Server ISDN cards. * Driver for Eicon DIVA Server ISDN cards.
* User Mode IDI Interface * User Mode IDI Interface
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#include "platform.h" #include "platform.h"
#include "di_defs.h" #include "di_defs.h"
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
#include "um_xdi.h" #include "um_xdi.h"
#include "um_idi.h" #include "um_idi.h"
static char *main_revision = "$Revision: 1.25 $"; static char *main_revision = "$Revision: 1.25.6.2 $";
static int major; static int major;
......
/* $Id: divasproc.c,v 1.19 2004/03/21 17:26:01 armin Exp $ /* $Id: divasproc.c,v 1.19.4.3 2005/01/31 12:22:20 armin Exp $
* *
* Low level driver for Eicon DIVA Server ISDN cards. * Low level driver for Eicon DIVA Server ISDN cards.
* /proc functions * /proc functions
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/list.h> #include <linux/list.h>
#include <asm/uaccess.h>
#include "platform.h" #include "platform.h"
#include "debuglib.h" #include "debuglib.h"
......
/* $Id: mntfunc.c,v 1.19.6.2 2004/08/28 20:03:53 armin Exp $ /* $Id: mntfunc.c,v 1.19.6.4 2005/01/31 12:22:20 armin Exp $
* *
* Driver for Eicon DIVA Server ISDN cards. * Driver for Eicon DIVA Server ISDN cards.
* Maint module * Maint module
...@@ -187,7 +187,7 @@ int maint_read_write(void __user *buf, int count) ...@@ -187,7 +187,7 @@ int maint_read_write(void __user *buf, int count)
if (!mask) { if (!mask) {
ret = diva_set_trace_filter (1, "*"); ret = diva_set_trace_filter (1, "*");
} else if (mask < sizeof(data)) { } else if (mask < sizeof(data)) {
if (copy_from_user(data, (char __user *)buf+12, mask)) { if (diva_os_copy_from_user(NULL, data, (char __user *)buf+12, mask)) {
ret = -EFAULT; ret = -EFAULT;
} else { } else {
ret = diva_set_trace_filter ((int)mask, data); ret = diva_set_trace_filter ((int)mask, data);
...@@ -199,7 +199,7 @@ int maint_read_write(void __user *buf, int count) ...@@ -199,7 +199,7 @@ int maint_read_write(void __user *buf, int count)
case DITRACE_READ_SELECTIVE_TRACE_FILTER: case DITRACE_READ_SELECTIVE_TRACE_FILTER:
if ((ret = diva_get_trace_filter (sizeof(data), data)) > 0) { if ((ret = diva_get_trace_filter (sizeof(data), data)) > 0) {
if (copy_to_user (buf, data, ret)) if (diva_os_copy_to_user (NULL, buf, data, ret))
ret = -EFAULT; ret = -EFAULT;
} else { } else {
ret = -ENODEV; ret = -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment