diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2009-04-14 20:30:55 +0000 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2009-06-18 07:30:44 +0000 |
commit | b6bf291f1c5bc84272a138b7367741e459005a81 (patch) | |
tree | 1989891cd0eefe7143f3809ca36627fe61fb759c /drivers/watchdog/davinci_wdt.c | |
parent | a77dba7e444a6618cbb666d1b42b79842b9c0171 (diff) | |
download | kernel_goldelico_gta04-b6bf291f1c5bc84272a138b7367741e459005a81.zip kernel_goldelico_gta04-b6bf291f1c5bc84272a138b7367741e459005a81.tar.gz kernel_goldelico_gta04-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/davinci_wdt.c')
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index c51d0b0..83e22e7 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -193,7 +193,7 @@ static struct miscdevice davinci_wdt_miscdev = { .fops = &davinci_wdt_fops, }; -static int davinci_wdt_probe(struct platform_device *pdev) +static int __devinit davinci_wdt_probe(struct platform_device *pdev) { int ret = 0, size; struct resource *res; @@ -237,7 +237,7 @@ static int davinci_wdt_probe(struct platform_device *pdev) return ret; } -static int davinci_wdt_remove(struct platform_device *pdev) +static int __devexit davinci_wdt_remove(struct platform_device *pdev) { misc_deregister(&davinci_wdt_miscdev); if (wdt_mem) { @@ -254,7 +254,7 @@ static struct platform_driver platform_wdt_driver = { .owner = THIS_MODULE, }, .probe = davinci_wdt_probe, - .remove = davinci_wdt_remove, + .remove = __devexit_p(davinci_wdt_remove), }; static int __init davinci_wdt_init(void) |