lkml.org 
[lkml]   [2012]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] MFD : add MAX77686 mfd driver
    Hi,

    > + mutex_lock(&max77686->iolock);
    > + ret = i2c_smbus_read_i2c_block_data(i2c, reg, count, buf);
    > + mutex_unlock(&max77686->iolock);

    Is it relly necessay to lock whenever you read/write from/to the
    i2c bus? Considering also that these are exported function,
    someone else may lock here before, so we can have a double
    locking on the same mutex.

    Andi


    \
     
     \ /
      Last update: 2012-04-30 11:41    [W:0.021 / U:92.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site