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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
18c75720e6
commit
aefd492068
@@ -2693,6 +2693,9 @@ static int __devinit isp1362_probe(struct platform_device *pdev)
|
|||||||
struct resource *irq_res;
|
struct resource *irq_res;
|
||||||
unsigned int irq_flags = 0;
|
unsigned int irq_flags = 0;
|
||||||
|
|
||||||
|
if (usb_disabled())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
/* basic sanity checks first. board-specific init logic should
|
/* basic sanity checks first. board-specific init logic should
|
||||||
* have initialized this the three resources and probably board
|
* have initialized this the three resources and probably board
|
||||||
* specific platform_data. we don't probe for IRQs, and do only
|
* specific platform_data. we don't probe for IRQs, and do only
|
||||||
@@ -2864,19 +2867,4 @@ static struct platform_driver isp1362_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
module_platform_driver(isp1362_driver);
|
||||||
|
|
||||||
static int __init isp1362_init(void)
|
|
||||||
{
|
|
||||||
if (usb_disabled())
|
|
||||||
return -ENODEV;
|
|
||||||
pr_info("driver %s, %s\n", hcd_name, DRIVER_VERSION);
|
|
||||||
return platform_driver_register(&isp1362_driver);
|
|
||||||
}
|
|
||||||
module_init(isp1362_init);
|
|
||||||
|
|
||||||
static void __exit isp1362_cleanup(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&isp1362_driver);
|
|
||||||
}
|
|
||||||
module_exit(isp1362_cleanup);
|
|
||||||
|
Reference in New Issue
Block a user