diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2012-02-28 12:57:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-02 16:20:29 -0800 |
commit | 427914801e553806ee6b25241603030ce376d43b (patch) | |
tree | e7b0c1ecbecfe7c8788a2f29a06e1b836f7c2ad5 | |
parent | 2e8d3fe4bf680b8263e0c81a8aa46a8d07b0f7be (diff) | |
download | talos-op-linux-427914801e553806ee6b25241603030ce376d43b.tar.gz talos-op-linux-427914801e553806ee6b25241603030ce376d43b.zip |
usb: r8a66597-hcd: Convert to module_platform_driver
Use the module_platform_driver macro, move the usb_disabled() check to
the probe function and get rid of the rather pointless message on module
load.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index e84ca1928dbf..2bf1320dc9c3 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -2428,6 +2428,9 @@ static int __devinit r8a66597_probe(struct platform_device *pdev) int i; unsigned long irq_trigger; + if (usb_disabled()) + return -ENODEV; + if (pdev->dev.dma_mask) { ret = -EINVAL; dev_err(&pdev->dev, "dma not supported\n"); @@ -2552,20 +2555,4 @@ static struct platform_driver r8a66597_driver = { }, }; -static int __init r8a66597_init(void) -{ - if (usb_disabled()) - return -ENODEV; - - printk(KERN_INFO KBUILD_MODNAME ": driver %s, %s\n", hcd_name, - DRIVER_VERSION); - return platform_driver_register(&r8a66597_driver); -} -module_init(r8a66597_init); - -static void __exit r8a66597_cleanup(void) -{ - platform_driver_unregister(&r8a66597_driver); -} -module_exit(r8a66597_cleanup); - +module_platform_driver(r8a66597_driver); |