Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Greg KH
On Wed, Aug 06, 2003 at 08:35:06PM +0200, Oliver Neukum wrote: But you CAN NOT mark the usb_device_id table as __devinitdata or __initdata as that will be touched later on if a new USB device is added, or if a new usb module is loaded. So these need to go. Applied, thanks. greg k-h

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Alan Stern
On Wed, 6 Aug 2003, Soewono Effendi wrote: As far as I understand, __init / __devinit is only relevant for device driver (codes) that are statically linked. In the case of USB Device Driver (not usbcore / usbhost ), one should actually not use __init/__devinit, since USB probe can happen at

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Greg KH
On Wed, Aug 06, 2003 at 11:44:00AM -0400, Alan Stern wrote: On Wed, 6 Aug 2003, Soewono Effendi wrote: On Wed, 6 Aug 2003 10:47:15 -0400 (EDT) Alan Stern [EMAIL PROTECTED] wrote: The upshot is that for USB, which is hotpluggable, __devinit and __devexit are useless. useless

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Soewono Effendi
Thanks, so it seems it doesn't hurt as USB is always hotpluggable. But I fail to see how it might help. As far as I understand, __init / __devinit is only relevant for device driver (codes) that are statically linked. In the case of USB Device Driver (not usbcore / usbhost ), one should

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Greg KH
On Fri, Aug 08, 2003 at 01:16:12AM +0200, Oliver Neukum wrote: Dangerous yes, unless hotplug is enabled. But hotplug should _always_ be enabled when USB support is present. You just have to use __init, __devinit correctly 8) Well, what exactly is correctly? Is it correct to say

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Greg KH
On Wed, Aug 06, 2003 at 03:28:01PM +0200, Oliver Neukum wrote: so it seems it doesn't hurt as USB is always hotpluggable. But I fail to see how it might help. Not true, you can run USB devices just fine with CONFIG_HOTPLUG disabled. CONFIG_HOTPLUG only causes the following to happen: -

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Soewono Effendi
Hi, __init and __devinit are defined in linux/include/linux/init.h There are some usefull hints in the file. __devinit is used mostly by HotPlug. This might also help: Found in linux/init/main.c ... static int init(void * unused) { ... /* * Ok, we have completed the initial

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-14 Thread Oliver Neukum
Dangerous yes, unless hotplug is enabled. But hotplug should _always_ be enabled when USB support is present. You just have to use __init, __devinit correctly 8) Well, what exactly is correctly? Is it correct to say that that drivers for hotpluggable hardware, whose subsystem always

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-08 Thread Oliver Neukum
But you CAN NOT mark the usb_device_id table as __devinitdata or __initdata as that will be touched later on if a new USB device is added, or if a new usb module is loaded. So these need to go. Regards Oliver You can import this changeset into BK by piping this whole

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-07 Thread Alan Cox
On Mer, 2003-08-06 at 16:44, Alan Stern wrote: useless - danger! if usb modules are statically linked to kernel, since the functions with __init are removed! unless __devinit is used and hotplug is enabled. module __init code can be ejected too Dangerous yes, unless hotplug is enabled.

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-06 Thread Alan Stern
On Wed, 6 Aug 2003, Soewono Effendi wrote: On Wed, 6 Aug 2003 10:47:15 -0400 (EDT) Alan Stern [EMAIL PROTECTED] wrote: The upshot is that for USB, which is hotpluggable, __devinit and __devexit are useless. useless - danger! if usb modules are statically linked to kernel, since the

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-06 Thread Oliver Neukum
Am Mittwoch, 6. August 2003 14:01 schrieb Soewono Effendi: Hi, __init and __devinit are defined in linux/include/linux/init.h There are some usefull hints in the file. __devinit is used mostly by HotPlug. This might also help: Found in linux/init/main.c ... static int init(void *

Re: [linux-usb-devel] use of __devinit in st5481

2003-08-06 Thread Soewono Effendi
On Wed, 6 Aug 2003 10:47:15 -0400 (EDT) Alan Stern [EMAIL PROTECTED] wrote: The upshot is that for USB, which is hotpluggable, __devinit and __devexit are useless. useless - danger! if usb modules are statically linked to kernel, since the functions with __init are removed! unless