]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/host/isp116x-hcd.c
usb: isp116x-hcd: Convert to module_platform_driver
[~andy/linux] / drivers / usb / host / isp116x-hcd.c
index d91e5f211a76558c2d808d8f1efa12dfb037f37e..924880087a747f571f06db9b23067649e8174861 100644 (file)
@@ -1569,6 +1569,9 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
        int ret = 0;
        unsigned long irqflags;
 
+       if (usb_disabled())
+               return -ENODEV;
+
        if (pdev->num_resources < 3) {
                ret = -ENODEV;
                goto err1;
@@ -1708,22 +1711,4 @@ static struct platform_driver isp116x_driver = {
        },
 };
 
-/*-----------------------------------------------------------------*/
-
-static int __init isp116x_init(void)
-{
-       if (usb_disabled())
-               return -ENODEV;
-
-       INFO("driver %s, %s\n", hcd_name, DRIVER_VERSION);
-       return platform_driver_register(&isp116x_driver);
-}
-
-module_init(isp116x_init);
-
-static void __exit isp116x_cleanup(void)
-{
-       platform_driver_unregister(&isp116x_driver);
-}
-
-module_exit(isp116x_cleanup);
+module_platform_driver(isp116x_driver);