Re: [1/2] lis3: Add device owner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 28, 2010 at 04:52:19AM -0400, Yuri Kululin wrote:
[ ... ]
> 
> > On a higher level, reassigning the owner like this seems to be quite uncommon,
> > at least in hwmon. I would like to see an Acked-by from Eric to ensure
> > that the fix is correct.
> 
> I tried to use the standard way of module usage control because all functions 
> provided by lis3lv02d_i2c.c, lis3lv02d_spi.c or hp_accel.c can be called through 
>   lis3lv02d_misc_fops file ops or joystick poll device.
> 
> I can propose another solution. We can use try_module_get(owner) during device 
> registration (in lis3lv02d_add_fs()), release module by using module_put(owner) 
>   after device unregister (in lis3lv02d_remove_fs()) and do not touch 
> lis3lv02d_misc_fops. But anyway dev->owner should be set.
> 
Key is really to get feedback from others, since I am neither familiar
with module ownership handling nor with this driver.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux