ChangeSet 1.1262, 2003/05/29 16:58:39-03:00, acme@conectiva.com.br o drivers/class/usb-midi: initialize struct usb_driver ->owner field And remove MOD_{INC,DEC}_USE_COUNT drivers/usb/class/usb-midi.c | 23 ++--------------------- 1 files changed, 2 insertions(+), 21 deletions(-) diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c Fri May 30 11:39:56 2003 +++ b/drivers/usb/class/usb-midi.c Fri May 30 11:39:56 2003 @@ -55,8 +55,6 @@ #undef HAVE_SUPPORT_ALSA -#undef MOD_INC_EACH_PROBE - /* ------------------------------------------------------------------------- */ static int singlebyte = 0; @@ -925,11 +923,6 @@ printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor); #endif - /** Side-effect: module cannot be removed until USE_COUNT is 0. **/ -#ifndef MOD_INC_EACH_PROBE - MOD_INC_USE_COUNT; -#endif - return 0; /** Success. **/ } @@ -978,15 +971,11 @@ wake_up(&open_wait); file->private_data = 0; - /** Sideeffect: Module cannot be removed until usecount is 0. */ -#ifndef MOD_INC_EACH_PROBE - MOD_DEC_USE_COUNT; -#endif - return 0; } static struct file_operations usb_midi_fops = { + .owner = THIS_MODULE, .llseek = usb_midi_llseek, .read = usb_midi_read, .write = usb_midi_write, @@ -2040,10 +2029,6 @@ list_add_tail(&s->mididev, &mididevs); up(&open_sem); -#ifdef MOD_INC_EACH_PROBE - MOD_INC_USE_COUNT; -#endif - usb_set_intfdata (intf, s); return 0; } @@ -2081,11 +2066,6 @@ } release_midi_device(s); wake_up(&open_wait); -#ifdef MOD_INC_EACH_PROBE - MOD_DEC_USE_COUNT; -#endif - - return; } /* we want to look at all devices by hand */ @@ -2095,6 +2075,7 @@ }; static struct usb_driver usb_midi_driver = { + .owner = THIS_MODULE, .name = "midi", .probe = usb_midi_probe, .disconnect = usb_midi_disconnect,