diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2012-02-28 06:57:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-02 19:20:29 -0500 |
commit | 6ef1a9276be455c114c000ef3d43666cb6ded371 (patch) | |
tree | 8e1bb58a8b9aa4df01d3256cf73c0e16846e925a /drivers/usb/host/sl811-hcd.c | |
parent | 427914801e553806ee6b25241603030ce376d43b (diff) |
usb: sl811-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>
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 961d6638d8f9..2a2cce2d2fa7 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1632,6 +1632,9 @@ sl811h_probe(struct platform_device *dev) | |||
1632 | u8 tmp, ioaddr = 0; | 1632 | u8 tmp, ioaddr = 0; |
1633 | unsigned long irqflags; | 1633 | unsigned long irqflags; |
1634 | 1634 | ||
1635 | if (usb_disabled()) | ||
1636 | return -ENODEV; | ||
1637 | |||
1635 | /* basic sanity checks first. board-specific init logic should | 1638 | /* basic sanity checks first. board-specific init logic should |
1636 | * have initialized these three resources and probably board | 1639 | * have initialized these three resources and probably board |
1637 | * specific platform_data. we don't probe for IRQs, and do only | 1640 | * specific platform_data. we don't probe for IRQs, and do only |
@@ -1817,20 +1820,4 @@ struct platform_driver sl811h_driver = { | |||
1817 | }; | 1820 | }; |
1818 | EXPORT_SYMBOL(sl811h_driver); | 1821 | EXPORT_SYMBOL(sl811h_driver); |
1819 | 1822 | ||
1820 | /*-------------------------------------------------------------------------*/ | 1823 | module_platform_driver(sl811h_driver); |
1821 | |||
1822 | static int __init sl811h_init(void) | ||
1823 | { | ||
1824 | if (usb_disabled()) | ||
1825 | return -ENODEV; | ||
1826 | |||
1827 | INFO("driver %s, %s\n", hcd_name, DRIVER_VERSION); | ||
1828 | return platform_driver_register(&sl811h_driver); | ||
1829 | } | ||
1830 | module_init(sl811h_init); | ||
1831 | |||
1832 | static void __exit sl811h_cleanup(void) | ||
1833 | { | ||
1834 | platform_driver_unregister(&sl811h_driver); | ||
1835 | } | ||
1836 | module_exit(sl811h_cleanup); | ||