diff options
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/geodewdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/ibmasr.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 4 | ||||
-rw-r--r-- | drivers/watchdog/rc32434_wdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/rdc321x_wdt.c | 6 | ||||
-rw-r--r-- | drivers/watchdog/wdt285.c | 15 |
6 files changed, 19 insertions, 19 deletions
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c index 614a5c7017b6..6799a6de66fe 100644 --- a/drivers/watchdog/geodewdt.c +++ b/drivers/watchdog/geodewdt.c | |||
@@ -130,8 +130,8 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data, | |||
130 | return len; | 130 | return len; |
131 | } | 131 | } |
132 | 132 | ||
133 | static int geodewdt_ioctl(struct inode *inode, struct file *file, | 133 | static long geodewdt_ioctl(struct file *file, unsigned int cmd, |
134 | unsigned int cmd, unsigned long arg) | 134 | unsigned long arg) |
135 | { | 135 | { |
136 | void __user *argp = (void __user *)arg; | 136 | void __user *argp = (void __user *)arg; |
137 | int __user *p = argp; | 137 | int __user *p = argp; |
@@ -198,7 +198,7 @@ static const struct file_operations geodewdt_fops = { | |||
198 | .owner = THIS_MODULE, | 198 | .owner = THIS_MODULE, |
199 | .llseek = no_llseek, | 199 | .llseek = no_llseek, |
200 | .write = geodewdt_write, | 200 | .write = geodewdt_write, |
201 | .ioctl = geodewdt_ioctl, | 201 | .unlocked_ioctl = geodewdt_ioctl, |
202 | .open = geodewdt_open, | 202 | .open = geodewdt_open, |
203 | .release = geodewdt_release, | 203 | .release = geodewdt_release, |
204 | }; | 204 | }; |
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index b82405cfb4cd..89fcefcc8510 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c | |||
@@ -85,7 +85,6 @@ static void __asr_toggle(void) | |||
85 | 85 | ||
86 | outb(reg & ~asr_toggle_mask, asr_write_addr); | 86 | outb(reg & ~asr_toggle_mask, asr_write_addr); |
87 | reg = inb(asr_read_addr); | 87 | reg = inb(asr_read_addr); |
88 | spin_unlock(&asr_lock); | ||
89 | } | 88 | } |
90 | 89 | ||
91 | static void asr_toggle(void) | 90 | static void asr_toggle(void) |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 0ed84162437b..6d9f3d4a9987 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
@@ -173,8 +173,8 @@ static const struct watchdog_info ident = { | |||
173 | .identity = "PNX4008 Watchdog", | 173 | .identity = "PNX4008 Watchdog", |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file, | 176 | static long pnx4008_wdt_ioctl(struct file *file, unsigned int cmd, |
177 | unsigned int cmd, unsigned long arg) | 177 | unsigned long arg) |
178 | { | 178 | { |
179 | int ret = -ENOTTY; | 179 | int ret = -ENOTTY; |
180 | int time; | 180 | int time; |
diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c index 6756bcb009ed..c9c73b69c5e5 100644 --- a/drivers/watchdog/rc32434_wdt.c +++ b/drivers/watchdog/rc32434_wdt.c | |||
@@ -182,8 +182,8 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data, | |||
182 | return 0; | 182 | return 0; |
183 | } | 183 | } |
184 | 184 | ||
185 | static int rc32434_wdt_ioctl(struct inode *inode, struct file *file, | 185 | static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd, |
186 | unsigned int cmd, unsigned long arg) | 186 | unsigned long arg) |
187 | { | 187 | { |
188 | void __user *argp = (void __user *)arg; | 188 | void __user *argp = (void __user *)arg; |
189 | int new_timeout; | 189 | int new_timeout; |
@@ -242,7 +242,7 @@ static struct file_operations rc32434_wdt_fops = { | |||
242 | .owner = THIS_MODULE, | 242 | .owner = THIS_MODULE, |
243 | .llseek = no_llseek, | 243 | .llseek = no_llseek, |
244 | .write = rc32434_wdt_write, | 244 | .write = rc32434_wdt_write, |
245 | .ioctl = rc32434_wdt_ioctl, | 245 | .unlocked_ioctl = rc32434_wdt_ioctl, |
246 | .open = rc32434_wdt_open, | 246 | .open = rc32434_wdt_open, |
247 | .release = rc32434_wdt_release, | 247 | .release = rc32434_wdt_release, |
248 | }; | 248 | }; |
diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c index 9108efa73e7d..bf92802f2bbe 100644 --- a/drivers/watchdog/rdc321x_wdt.c +++ b/drivers/watchdog/rdc321x_wdt.c | |||
@@ -144,8 +144,8 @@ static int rdc321x_wdt_release(struct inode *inode, struct file *file) | |||
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | static int rdc321x_wdt_ioctl(struct inode *inode, struct file *file, | 147 | static long rdc321x_wdt_ioctl(struct file *file, unsigned int cmd, |
148 | unsigned int cmd, unsigned long arg) | 148 | unsigned long arg) |
149 | { | 149 | { |
150 | void __user *argp = (void __user *)arg; | 150 | void __user *argp = (void __user *)arg; |
151 | unsigned int value; | 151 | unsigned int value; |
@@ -204,7 +204,7 @@ static ssize_t rdc321x_wdt_write(struct file *file, const char __user *buf, | |||
204 | static const struct file_operations rdc321x_wdt_fops = { | 204 | static const struct file_operations rdc321x_wdt_fops = { |
205 | .owner = THIS_MODULE, | 205 | .owner = THIS_MODULE, |
206 | .llseek = no_llseek, | 206 | .llseek = no_llseek, |
207 | .ioctl = rdc321x_wdt_ioctl, | 207 | .unlocked_ioctl = rdc321x_wdt_ioctl, |
208 | .open = rdc321x_wdt_open, | 208 | .open = rdc321x_wdt_open, |
209 | .write = rdc321x_wdt_write, | 209 | .write = rdc321x_wdt_write, |
210 | .release = rdc321x_wdt_release, | 210 | .release = rdc321x_wdt_release, |
diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c index db362c34958b..191ea6302107 100644 --- a/drivers/watchdog/wdt285.c +++ b/drivers/watchdog/wdt285.c | |||
@@ -115,8 +115,8 @@ static int watchdog_release(struct inode *inode, struct file *file) | |||
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | 117 | ||
118 | static ssize_t watchdog_write(struct file *file, const char *data, | 118 | static ssize_t watchdog_write(struct file *file, const char __user *data, |
119 | size_t len, loff_t *ppos) | 119 | size_t len, loff_t *ppos) |
120 | { | 120 | { |
121 | /* | 121 | /* |
122 | * Refresh the timer. | 122 | * Refresh the timer. |
@@ -133,21 +133,22 @@ static const struct watchdog_info ident = { | |||
133 | }; | 133 | }; |
134 | 134 | ||
135 | static long watchdog_ioctl(struct file *file, unsigned int cmd, | 135 | static long watchdog_ioctl(struct file *file, unsigned int cmd, |
136 | unsigned long arg) | 136 | unsigned long arg) |
137 | { | 137 | { |
138 | unsigned int new_margin; | 138 | unsigned int new_margin; |
139 | int __user *int_arg = (int __user *)arg; | ||
139 | int ret = -ENOTTY; | 140 | int ret = -ENOTTY; |
140 | 141 | ||
141 | switch (cmd) { | 142 | switch (cmd) { |
142 | case WDIOC_GETSUPPORT: | 143 | case WDIOC_GETSUPPORT: |
143 | ret = 0; | 144 | ret = 0; |
144 | if (copy_to_user((void *)arg, &ident, sizeof(ident))) | 145 | if (copy_to_user((void __user *)arg, &ident, sizeof(ident))) |
145 | ret = -EFAULT; | 146 | ret = -EFAULT; |
146 | break; | 147 | break; |
147 | 148 | ||
148 | case WDIOC_GETSTATUS: | 149 | case WDIOC_GETSTATUS: |
149 | case WDIOC_GETBOOTSTATUS: | 150 | case WDIOC_GETBOOTSTATUS: |
150 | ret = put_user(0, (int *)arg); | 151 | ret = put_user(0, int_arg); |
151 | break; | 152 | break; |
152 | 153 | ||
153 | case WDIOC_KEEPALIVE: | 154 | case WDIOC_KEEPALIVE: |
@@ -156,7 +157,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, | |||
156 | break; | 157 | break; |
157 | 158 | ||
158 | case WDIOC_SETTIMEOUT: | 159 | case WDIOC_SETTIMEOUT: |
159 | ret = get_user(new_margin, (int *)arg); | 160 | ret = get_user(new_margin, int_arg); |
160 | if (ret) | 161 | if (ret) |
161 | break; | 162 | break; |
162 | 163 | ||
@@ -171,7 +172,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, | |||
171 | watchdog_ping(); | 172 | watchdog_ping(); |
172 | /* Fall */ | 173 | /* Fall */ |
173 | case WDIOC_GETTIMEOUT: | 174 | case WDIOC_GETTIMEOUT: |
174 | ret = put_user(soft_margin, (int *)arg); | 175 | ret = put_user(soft_margin, int_arg); |
175 | break; | 176 | break; |
176 | } | 177 | } |
177 | return ret; | 178 | return ret; |