aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/davinci_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/davinci_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/davinci_wdt.c')
-rw-r--r--drivers/watchdog/davinci_wdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index c51d0b0ea0c4..83e22e7ea4a2 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -193,7 +193,7 @@ static struct miscdevice davinci_wdt_miscdev = {
193 .fops = &davinci_wdt_fops, 193 .fops = &davinci_wdt_fops,
194}; 194};
195 195
196static int davinci_wdt_probe(struct platform_device *pdev) 196static int __devinit davinci_wdt_probe(struct platform_device *pdev)
197{ 197{
198 int ret = 0, size; 198 int ret = 0, size;
199 struct resource *res; 199 struct resource *res;
@@ -237,7 +237,7 @@ static int davinci_wdt_probe(struct platform_device *pdev)
237 return ret; 237 return ret;
238} 238}
239 239
240static int davinci_wdt_remove(struct platform_device *pdev) 240static int __devexit davinci_wdt_remove(struct platform_device *pdev)
241{ 241{
242 misc_deregister(&davinci_wdt_miscdev); 242 misc_deregister(&davinci_wdt_miscdev);
243 if (wdt_mem) { 243 if (wdt_mem) {
@@ -254,7 +254,7 @@ static struct platform_driver platform_wdt_driver = {
254 .owner = THIS_MODULE, 254 .owner = THIS_MODULE,
255 }, 255 },
256 .probe = davinci_wdt_probe, 256 .probe = davinci_wdt_probe,
257 .remove = davinci_wdt_remove, 257 .remove = __devexit_p(davinci_wdt_remove),
258}; 258};
259 259
260static int __init davinci_wdt_init(void) 260static int __init davinci_wdt_init(void)