lkml.org 
[lkml]   [2010]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [2/2] lis3: Set device owner
    On Fri, Aug 27, 2010 at 02:33:21PM -0000, Yuri Ershov wrote:
    > Set device owner for i2c part.
    >
    > Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
    >
    > ---
    > drivers/hwmon/lis3lv02d_i2c.c | 2 ++
    > 1 files changed, 2 insertions(+), 0 deletions(-)
    >
    > diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
    > index b2f8bae..1a55bb3 100644
    > --- a/drivers/hwmon/lis3lv02d_i2c.c
    > +++ b/drivers/hwmon/lis3lv02d_i2c.c
    > @@ -129,6 +129,7 @@ static int __devinit lis3lv02d_i2c_probe(struct i2c_client *client,
    > lis3_dev.reg_ctrl = lis3_reg_ctrl;
    > lis3_dev.irq = client->irq;
    > lis3_dev.ac = lis3lv02d_axis_map;
    > + lis3_dev.owner = THIS_MODULE;
    >
    > i2c_set_clientdata(client, &lis3_dev);
    >
    > @@ -149,6 +150,7 @@ static int __devexit lis3lv02d_i2c_remove(struct i2c_client *client)
    >
    > lis3lv02d_joystick_disable();
    > lis3lv02d_remove_fs(&lis3_dev);
    > + lis3_dev.owner = NULL;
    >
    Should not be necessary, since you are about to unload the driver.
    Unless I am missing something, of course.

    Guenter



    \
     
     \ /
      Last update: 2010-09-27 20:09    [W:0.033 / U:0.880 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site