[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Incorrect uses of get_driver()/put_driver()
    On Mon, 9 Jan 2012 12:35:09 -0500 (EST)
    Alan Stern <> wrote:

    > drivers/ssb/main.c:146: get_driver(&drv->drv);
    > drivers/ssb/main.c:153: put_driver(&drv->drv);
    > Michael, these are part of ssb_driver_get() and ssb_driver_put(), used
    > in ssb_devices_freeze() and ssb_devices_thaw(). They don't currently
    > do anything, but it looks as if they are meant to prevent the driver
    > from being unloaded. Should they be replaced with try_module_get()?
    > Or would it be good enough to call device_attach() in
    > ssb_devices_thaw()?

    Hm, It seems that this code is trying to pin the ssb_driver, so that
    it doesn't become invalid during the freeze period. So it most likely wants
    to protect against module unload and driver unbind here. Not sure
    if that actually works, though :/

    Greetings, Michael.

     \ /
      Last update: 2012-01-09 19:05    [W:0.020 / U:112.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site