diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2012-02-17 10:30:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 16:12:16 -0500 |
commit | aefd49206814413b5ade2f98ff062c4c8d47ec4f (patch) | |
tree | c9dce3d7fb4fc26eecc87540b571d54051aaa7e4 /drivers/usb/host/isp1362-hcd.c | |
parent | 18c75720e667719c923e0547abb60dfcd9c4ee90 (diff) |
usb: isp1362-hcd: Convert to module_platform_driver
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>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-rw-r--r-- | drivers/usb/host/isp1362-hcd.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index e5fd8aa57af1..9e63cdf1ab75 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c | |||
@@ -2693,6 +2693,9 @@ static int __devinit isp1362_probe(struct platform_device *pdev) | |||
2693 | struct resource *irq_res; | 2693 | struct resource *irq_res; |
2694 | unsigned int irq_flags = 0; | 2694 | unsigned int irq_flags = 0; |
2695 | 2695 | ||
2696 | if (usb_disabled()) | ||
2697 | return -ENODEV; | ||
2698 | |||
2696 | /* basic sanity checks first. board-specific init logic should | 2699 | /* basic sanity checks first. board-specific init logic should |
2697 | * have initialized this the three resources and probably board | 2700 | * have initialized this the three resources and probably board |
2698 | * specific platform_data. we don't probe for IRQs, and do only | 2701 | * specific platform_data. we don't probe for IRQs, and do only |
@@ -2864,19 +2867,4 @@ static struct platform_driver isp1362_driver = { | |||
2864 | }, | 2867 | }, |
2865 | }; | 2868 | }; |
2866 | 2869 | ||
2867 | /*-------------------------------------------------------------------------*/ | 2870 | module_platform_driver(isp1362_driver); |
2868 | |||
2869 | static int __init isp1362_init(void) | ||
2870 | { | ||
2871 | if (usb_disabled()) | ||
2872 | return -ENODEV; | ||
2873 | pr_info("driver %s, %s\n", hcd_name, DRIVER_VERSION); | ||
2874 | return platform_driver_register(&isp1362_driver); | ||
2875 | } | ||
2876 | module_init(isp1362_init); | ||
2877 | |||
2878 | static void __exit isp1362_cleanup(void) | ||
2879 | { | ||
2880 | platform_driver_unregister(&isp1362_driver); | ||
2881 | } | ||
2882 | module_exit(isp1362_cleanup); | ||