From m.kozlowski@tuxland.pl Wed Mar 11 14:34:18 2009 From: Mariusz Kozlowski Date: Tue, 3 Mar 2009 19:38:32 +0100 Subject: Staging: comedi: usbduxfast: don't initialize semaphores on init To: gregkh@suse.de Cc: m.kozlowski@tuxland.pl Message-ID: <1236105518-19565-3-git-send-email-m.kozlowski@tuxland.pl> This patch removes usbduxfast semaphores initialization from init function as they are initialized later on in probe function. Also remove init_usb_devices() as it is not needed anymore. Signed-off-by: Mariusz Kozlowski Cc: Bernd Porr Cc: Ian Abbott Cc: Frank Mori Hess Cc: David Schleef Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/usbduxfast.c | 18 ------------------ 1 file changed, 18 deletions(-) --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -1862,23 +1862,6 @@ static comedi_driver driver_usbduxfast = .detach = usbduxfast_detach }; -static void __init init_usb_devices(void) -{ - int index; - -#ifdef CONFIG_COMEDI_DEBUG - printk(KERN_DEBUG "comedi_: usbduxfast: setting all possible devs to " - "invalid\n"); -#endif - /* - * all devices entries are invalid to begin with - * they will become valid by the probe function - * and then finally by the attach-function - */ - for (index = 0; index < NUMUSBDUXFAST; index++) - init_MUTEX(&(usbduxfastsub[index].sem)); -} - /* * Table with the USB-devices: just now only testing IDs */ @@ -1912,7 +1895,6 @@ static int __init init_usbduxfast(void) { printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" DRIVER_DESC "\n"); - init_usb_devices(); usb_register(&usbduxfastsub_driver); comedi_driver_register(&driver_usbduxfast); return 0;