[lkml]   [2011]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Module parameters and __initdata
On Thu, 6 Jan 2011 08:46:59 am Alan Stern wrote:
> Is the proper use of "__initdata" with module parameters documented
> anywhere?
> I'm running into problems with drivers/usb/gadget/printer.c, which
> includes code such as this:
> static ushort __initdata bcdDevice;
> module_param(bcdDevice, ushort, S_IRUGO);
> MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)");

You need to make perm 0. You can't read it if it's freed after init!


 \ /
  Last update: 2011-01-17 00:23    [from the cache]
©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site