Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tobias Klauser and committed by
Greg Kroah-Hartman
aefd4920 18c75720

+4 -16
+4 -16
drivers/usb/host/isp1362-hcd.c
··· 2693 2693 struct resource *irq_res; 2694 2694 unsigned int irq_flags = 0; 2695 2695 2696 + if (usb_disabled()) 2697 + return -ENODEV; 2698 + 2696 2699 /* basic sanity checks first. board-specific init logic should 2697 2700 * have initialized this the three resources and probably board 2698 2701 * specific platform_data. we don't probe for IRQs, and do only ··· 2867 2864 }, 2868 2865 }; 2869 2866 2870 - /*-------------------------------------------------------------------------*/ 2871 - 2872 - static int __init isp1362_init(void) 2873 - { 2874 - if (usb_disabled()) 2875 - return -ENODEV; 2876 - pr_info("driver %s, %s\n", hcd_name, DRIVER_VERSION); 2877 - return platform_driver_register(&isp1362_driver); 2878 - } 2879 - module_init(isp1362_init); 2880 - 2881 - static void __exit isp1362_cleanup(void) 2882 - { 2883 - platform_driver_unregister(&isp1362_driver); 2884 - } 2885 - module_exit(isp1362_cleanup); 2867 + module_platform_driver(isp1362_driver);