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
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
arch
/
um
/
drivers
/
harddog_kern.c
diff --git
a/arch/um/drivers/harddog_kern.c
b/arch/um/drivers/harddog_kern.c
index
49acb2b
..
64ff22a
100644
(file)
--- a/
arch/um/drivers/harddog_kern.c
+++ b/
arch/um/drivers/harddog_kern.c
@@
-35,7
+35,6
@@
*/
#include <linux/module.h>
*/
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
@@
-104,7
+103,7
@@
static int harddog_release(struct inode *inode, struct file *file)
extern int ping_watchdog(int fd);
extern int ping_watchdog(int fd);
-static ssize_t harddog_write(struct file *file, const char *data, size_t len,
+static ssize_t harddog_write(struct file *file, const char
__user
*data, size_t len,
loff_t *ppos)
{
/*
loff_t *ppos)
{
/*
@@
-118,6
+117,7
@@
static ssize_t harddog_write(struct file *file, const char *data, size_t len,
static int harddog_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
static int harddog_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
+ void __user *argp= (void __user *)arg;
static struct watchdog_info ident = {
WDIOC_SETTIMEOUT,
0,
static struct watchdog_info ident = {
WDIOC_SETTIMEOUT,
0,
@@
-127,13
+127,12
@@
static int harddog_ioctl(struct inode *inode, struct file *file,
default:
return -ENOTTY;
case WDIOC_GETSUPPORT:
default:
return -ENOTTY;
case WDIOC_GETSUPPORT:
- if(copy_to_user((struct harddog_info *)arg, &ident,
- sizeof(ident)))
+ if(copy_to_user(argp, &ident, sizeof(ident)))
return -EFAULT;
return 0;
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
return -EFAULT;
return 0;
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
- return put_user(0,(int
*)arg
);
+ return put_user(0,(int
__user *)argp
);
case WDIOC_KEEPALIVE:
return(ping_watchdog(harddog_out_fd));
}
case WDIOC_KEEPALIVE:
return(ping_watchdog(harddog_out_fd));
}