diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-12-15 18:35:24 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-12-15 18:35:24 -0500 |
commit | 2a1e1379bae53f647c463a677cc2ec71b591c348 (patch) | |
tree | a152beb5e8679e94430c5b47bf798dd8a2d4fd5d /drivers/char/watchdog/booke_wdt.c | |
parent | 787926b1b2d21d42ca462dc736b77f1a4a30c503 (diff) | |
parent | 7b6666530e2736f190a2629c8abe34275054449f (diff) |
Merge by hand (conflicts in scsi_lib.c)
This merge is pretty extensive. The conflict is over the new
req->retries parameter, so I had to change the prototype to
scsi_setup_blk_pc_cmnd() and the usage in sd, sr and st.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/char/watchdog/booke_wdt.c')
-rw-r--r-- | drivers/char/watchdog/booke_wdt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c index 65830ec71042..c800cce73c1e 100644 --- a/drivers/char/watchdog/booke_wdt.c +++ b/drivers/char/watchdog/booke_wdt.c | |||
@@ -72,7 +72,7 @@ static __inline__ void booke_wdt_ping(void) | |||
72 | /* | 72 | /* |
73 | * booke_wdt_write: | 73 | * booke_wdt_write: |
74 | */ | 74 | */ |
75 | static ssize_t booke_wdt_write (struct file *file, const char *buf, | 75 | static ssize_t booke_wdt_write (struct file *file, const char __user *buf, |
76 | size_t count, loff_t *ppos) | 76 | size_t count, loff_t *ppos) |
77 | { | 77 | { |
78 | booke_wdt_ping(); | 78 | booke_wdt_ping(); |
@@ -92,14 +92,15 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file, | |||
92 | unsigned int cmd, unsigned long arg) | 92 | unsigned int cmd, unsigned long arg) |
93 | { | 93 | { |
94 | u32 tmp = 0; | 94 | u32 tmp = 0; |
95 | u32 __user *p = (u32 __user *)arg; | ||
95 | 96 | ||
96 | switch (cmd) { | 97 | switch (cmd) { |
97 | case WDIOC_GETSUPPORT: | 98 | case WDIOC_GETSUPPORT: |
98 | if (copy_to_user ((struct watchdog_info *) arg, &ident, | 99 | if (copy_to_user ((struct watchdog_info __user *) arg, &ident, |
99 | sizeof(struct watchdog_info))) | 100 | sizeof(struct watchdog_info))) |
100 | return -EFAULT; | 101 | return -EFAULT; |
101 | case WDIOC_GETSTATUS: | 102 | case WDIOC_GETSTATUS: |
102 | return put_user(ident.options, (u32 *) arg); | 103 | return put_user(ident.options, p); |
103 | case WDIOC_GETBOOTSTATUS: | 104 | case WDIOC_GETBOOTSTATUS: |
104 | /* XXX: something is clearing TSR */ | 105 | /* XXX: something is clearing TSR */ |
105 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); | 106 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); |
@@ -109,14 +110,14 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file, | |||
109 | booke_wdt_ping(); | 110 | booke_wdt_ping(); |
110 | return 0; | 111 | return 0; |
111 | case WDIOC_SETTIMEOUT: | 112 | case WDIOC_SETTIMEOUT: |
112 | if (get_user(booke_wdt_period, (u32 *) arg)) | 113 | if (get_user(booke_wdt_period, p)) |
113 | return -EFAULT; | 114 | return -EFAULT; |
114 | mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period)); | 115 | mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period)); |
115 | return 0; | 116 | return 0; |
116 | case WDIOC_GETTIMEOUT: | 117 | case WDIOC_GETTIMEOUT: |
117 | return put_user(booke_wdt_period, (u32 *) arg); | 118 | return put_user(booke_wdt_period, p); |
118 | case WDIOC_SETOPTIONS: | 119 | case WDIOC_SETOPTIONS: |
119 | if (get_user(tmp, (u32 *) arg)) | 120 | if (get_user(tmp, p)) |
120 | return -EINVAL; | 121 | return -EINVAL; |
121 | if (tmp == WDIOS_ENABLECARD) { | 122 | if (tmp == WDIOS_ENABLECARD) { |
122 | booke_wdt_ping(); | 123 | booke_wdt_ping(); |