mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 03:47:43 +00:00
usb: isp116x-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>
This commit is contained in:
parent
b1116dcc63
commit
2e8d3fe4bf
@ -1569,6 +1569,9 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned long irqflags;
|
unsigned long irqflags;
|
||||||
|
|
||||||
|
if (usb_disabled())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
if (pdev->num_resources < 3) {
|
if (pdev->num_resources < 3) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err1;
|
goto err1;
|
||||||
@ -1708,22 +1711,4 @@ static struct platform_driver isp116x_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-----------------------------------------------------------------*/
|
module_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);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user