summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/rdc321x_wdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2009-04-14 20:30:55 +0000
committerWim Van Sebroeck <wim@iguana.be>2009-06-18 07:30:44 +0000
commitb6bf291f1c5bc84272a138b7367741e459005a81 (patch)
tree1989891cd0eefe7143f3809ca36627fe61fb759c /drivers/watchdog/rdc321x_wdt.c
parenta77dba7e444a6618cbb666d1b42b79842b9c0171 (diff)
downloadlinux-b6bf291f1c5bc84272a138b7367741e459005a81.tar.bz2
[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/rdc321x_wdt.c')
-rw-r--r--drivers/watchdog/rdc321x_wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c
index 36e221beedcd..4976bfd1fce6 100644
--- a/drivers/watchdog/rdc321x_wdt.c
+++ b/drivers/watchdog/rdc321x_wdt.c
@@ -245,7 +245,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
return 0;
}
-static int rdc321x_wdt_remove(struct platform_device *pdev)
+static int __devexit rdc321x_wdt_remove(struct platform_device *pdev)
{
if (rdc321x_wdt_device.queue) {
rdc321x_wdt_device.queue = 0;
@@ -259,7 +259,7 @@ static int rdc321x_wdt_remove(struct platform_device *pdev)
static struct platform_driver rdc321x_wdt_driver = {
.probe = rdc321x_wdt_probe,
- .remove = rdc321x_wdt_remove,
+ .remove = __devexit_p(rdc321x_wdt_remove),
.driver = {
.owner = THIS_MODULE,
.name = "rdc321x-wdt",