aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pnx4008_wdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2009-04-14 16:30:55 -0400
committerWim Van Sebroeck <wim@iguana.be>2009-06-18 03:30:44 -0400
commitb6bf291f1c5bc84272a138b7367741e459005a81 (patch)
tree1989891cd0eefe7143f3809ca36627fe61fb759c /drivers/watchdog/pnx4008_wdt.c
parenta77dba7e444a6618cbb666d1b42b79842b9c0171 (diff)
[WATCHDOG] move platform probe and remove function to devinit and devexit
A pointer to probe and remove functions is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/pnx4008_wdt.c')
-rw-r--r--drivers/watchdog/pnx4008_wdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 64135195f827..f24d04132eda 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -246,7 +246,7 @@ static struct miscdevice pnx4008_wdt_miscdev = {
246 .fops = &pnx4008_wdt_fops, 246 .fops = &pnx4008_wdt_fops,
247}; 247};
248 248
249static int pnx4008_wdt_probe(struct platform_device *pdev) 249static int __devinit pnx4008_wdt_probe(struct platform_device *pdev)
250{ 250{
251 int ret = 0, size; 251 int ret = 0, size;
252 struct resource *res; 252 struct resource *res;
@@ -299,7 +299,7 @@ out:
299 return ret; 299 return ret;
300} 300}
301 301
302static int pnx4008_wdt_remove(struct platform_device *pdev) 302static int __devexit pnx4008_wdt_remove(struct platform_device *pdev)
303{ 303{
304 misc_deregister(&pnx4008_wdt_miscdev); 304 misc_deregister(&pnx4008_wdt_miscdev);
305 if (wdt_clk) { 305 if (wdt_clk) {
@@ -321,7 +321,7 @@ static struct platform_driver platform_wdt_driver = {
321 .owner = THIS_MODULE, 321 .owner = THIS_MODULE,
322 }, 322 },
323 .probe = pnx4008_wdt_probe, 323 .probe = pnx4008_wdt_probe,
324 .remove = pnx4008_wdt_remove, 324 .remove = __devexit_p(pnx4008_wdt_remove),
325}; 325};
326 326
327static int __init pnx4008_wdt_init(void) 327static int __init pnx4008_wdt_init(void)