Re: [PATCH v7 16/24] i2c: allow adapter drivers to override the adapter locking

Antti Palosaari
2016-05-02T19:20:51Z

On 04/29/2016 12:16 PM, Peter Rosin wrote:
> On 2016-04-29 09:16, Wolfram Sang wrote:
>>> Yes, obviously... I'll make that change locally and wait for the rest.
>> Another nit: You could use '--strict' with checkpatch and see if you
>> want to fix the issues reported. I am not keen on those (except for
>> 'space around operators'), it's a matter of taste I guess, but maybe you
>> like some of the suggestions.
>>
> Yes, they look like reasonable complaints.
>
> So, I fixed all of them locally except the complaint about lack of comment
> on the new struct mutex member in struct si2168_dev (patch 21/24),
> because that patch is Anttis and he's the maintainer of that driver...
>
> Antti, if you want that fixed as part of this series, send a suitable comment
> for the mutex this way and I'll incorporate it.

Ah, I never ran checkpatch with --strict option...

CHECK: struct mutex definition without comment
#202: FILE: drivers/media/dvb-frontends/si2168_priv.h:32:
+ struct mutex i2c_mutex;

If you wish you could add some comment for it, but for me it is still
pretty much self explaining. It is lock to protect firmware command
execution. Command is executed always with I2C write and then poll reply
using I2C read until it timeouts or answers with "ready" status.

regards
Antti

--