diff options
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r-- | drivers/char/watchdog/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/watchdog/booke_wdt.c | 15 | ||||
-rw-r--r-- | drivers/char/watchdog/ixp4xx_wdt.c | 4 | ||||
-rw-r--r-- | drivers/char/watchdog/mpcore_wdt.c | 4 | ||||
-rw-r--r-- | drivers/char/watchdog/pcwd_usb.c | 1 | ||||
-rw-r--r-- | drivers/char/watchdog/wdrtas.c | 2 |
6 files changed, 12 insertions, 16 deletions
diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig index 344001b45af9..a6544790af60 100644 --- a/drivers/char/watchdog/Kconfig +++ b/drivers/char/watchdog/Kconfig | |||
@@ -438,7 +438,7 @@ config INDYDOG | |||
438 | 438 | ||
439 | config ZVM_WATCHDOG | 439 | config ZVM_WATCHDOG |
440 | tristate "z/VM Watchdog Timer" | 440 | tristate "z/VM Watchdog Timer" |
441 | depends on WATCHDOG && ARCH_S390 | 441 | depends on WATCHDOG && S390 |
442 | help | 442 | help |
443 | IBM s/390 and zSeries machines running under z/VM 5.1 or later | 443 | IBM s/390 and zSeries machines running under z/VM 5.1 or later |
444 | provide a virtual watchdog timer to their guest that cause a | 444 | provide a virtual watchdog timer to their guest that cause a |
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c index 65830ec71042..b6640606b44d 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(); |
@@ -172,7 +173,7 @@ static int __init booke_wdt_init(void) | |||
172 | int ret = 0; | 173 | int ret = 0; |
173 | 174 | ||
174 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); | 175 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); |
175 | ident.firmware_version = cpu_specs[0].pvr_value; | 176 | ident.firmware_version = cur_cpu_spec->pvr_value; |
176 | 177 | ||
177 | ret = misc_register(&booke_wdt_miscdev); | 178 | ret = misc_register(&booke_wdt_miscdev); |
178 | if (ret) { | 179 | if (ret) { |
diff --git a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c index b5be8b11104a..3800835ca8f3 100644 --- a/drivers/char/watchdog/ixp4xx_wdt.c +++ b/drivers/char/watchdog/ixp4xx_wdt.c | |||
@@ -186,8 +186,8 @@ static int __init ixp4xx_wdt_init(void) | |||
186 | unsigned long processor_id; | 186 | unsigned long processor_id; |
187 | 187 | ||
188 | asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :); | 188 | asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :); |
189 | if (!(processor_id & 0xf)) { | 189 | if (!(processor_id & 0xf) && !cpu_is_ixp46x()) { |
190 | printk("IXP4XXX Watchdog: Rev. A0 CPU detected - " | 190 | printk("IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected - " |
191 | "watchdog disabled\n"); | 191 | "watchdog disabled\n"); |
192 | 192 | ||
193 | return -ENODEV; | 193 | return -ENODEV; |
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 9defcf861b67..b4d843489881 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c | |||
@@ -180,10 +180,6 @@ static ssize_t mpcore_wdt_write(struct file *file, const char *data, size_t len, | |||
180 | { | 180 | { |
181 | struct mpcore_wdt *wdt = file->private_data; | 181 | struct mpcore_wdt *wdt = file->private_data; |
182 | 182 | ||
183 | /* Can't seek (pwrite) on this device */ | ||
184 | if (ppos != &file->f_pos) | ||
185 | return -ESPIPE; | ||
186 | |||
187 | /* | 183 | /* |
188 | * Refresh the timer. | 184 | * Refresh the timer. |
189 | */ | 185 | */ |
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 092e9b133750..1533f56baa42 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c | |||
@@ -151,7 +151,6 @@ static void usb_pcwd_disconnect (struct usb_interface *interface); | |||
151 | 151 | ||
152 | /* usb specific object needed to register this driver with the usb subsystem */ | 152 | /* usb specific object needed to register this driver with the usb subsystem */ |
153 | static struct usb_driver usb_pcwd_driver = { | 153 | static struct usb_driver usb_pcwd_driver = { |
154 | .owner = THIS_MODULE, | ||
155 | .name = DRIVER_NAME, | 154 | .name = DRIVER_NAME, |
156 | .probe = usb_pcwd_probe, | 155 | .probe = usb_pcwd_probe, |
157 | .disconnect = usb_pcwd_disconnect, | 156 | .disconnect = usb_pcwd_disconnect, |
diff --git a/drivers/char/watchdog/wdrtas.c b/drivers/char/watchdog/wdrtas.c index 619e2ffca33f..dacfe31caccf 100644 --- a/drivers/char/watchdog/wdrtas.c +++ b/drivers/char/watchdog/wdrtas.c | |||
@@ -320,7 +320,7 @@ static int | |||
320 | wdrtas_ioctl(struct inode *inode, struct file *file, | 320 | wdrtas_ioctl(struct inode *inode, struct file *file, |
321 | unsigned int cmd, unsigned long arg) | 321 | unsigned int cmd, unsigned long arg) |
322 | { | 322 | { |
323 | int __user *argp = (void *)arg; | 323 | int __user *argp = (void __user *)arg; |
324 | int i; | 324 | int i; |
325 | static struct watchdog_info wdinfo = { | 325 | static struct watchdog_info wdinfo = { |
326 | .options = WDRTAS_SUPPORTED_MASK, | 326 | .options = WDRTAS_SUPPORTED_MASK, |