lkml.org 
[lkml]   [2011]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Allow setting of number of raw devices as a module parameter
    On Sat 30-04-11 14:15:02, Arnd Bergmann wrote:
    > On Friday 29 April 2011 00:24:29 Jan Kara wrote:
    > > Allow setting of maximal number of raw devices as a module parameter. This
    > > requires changing of static array into a vmalloced one (the array is going to
    > > be too large for kmalloc).
    > >
    > > Signed-off-by: Jan Kara <jack@suse.cz>
    >
    > Why don't you get rid of the global raw_devices array instead?
    >
    > I suppose if you embed the struct cdev in raw_device_data and
    > register it during RAW_SETBIND separately for each raw device
    > instead of globally at raw_init time, you can support any number
    > of devices while making the code smaller and simpler. I suppose
    > you can even remove the raw_mutex then.
    OK, I see. This might be a reasonable option. I'd then use kobj_lookup()
    to find my structure where I need it instead of array indexing, right?
    I have really zero experience with writing device drivers so I'm asking
    simple questions :).

    Honza
    --
    Jan Kara <jack@suse.cz>
    SUSE Labs, CR


    \
     
     \ /
      Last update: 2011-05-02 21:41    [W:4.376 / U:2.736 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site