Re: [PATCH] MFD : add MAX77686 mfd driver

From: jonghwa3 . lee
Date: Wed May 02 2012 - 01:02:55 EST


Hi, Andi.

These exported functions will be used in 77686 area only, so there is no
overlap locking.

Thanks.

On 2012-04-30 18:17, Andi Shyti wrote:

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/