Re: [PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct device

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

 



On 06/04/16 08:35, Joachim Eastwood wrote:
> Hi Alison,
> 
> On 6 April 2016 at 07:18, Alison Schofield <amsfield22@xxxxxxxxx> wrote:
>> Driver includes struct regmap and struct device in its global data.
>> Remove the struct device and use regmap API to retrieve device info.
>>
>> Patch created using Coccinelle plus manual edits.
>>
>> Signed-off-by: Alison Schofield <amsfield22@xxxxxxxxx>
>> ---
>>  drivers/iio/accel/mma7455_core.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/accel/mma7455_core.c b/drivers/iio/accel/mma7455_core.c
>> index c633cc2..c902f54 100644
>> --- a/drivers/iio/accel/mma7455_core.c
>> +++ b/drivers/iio/accel/mma7455_core.c
>> @@ -55,11 +55,11 @@
>>
>>  struct mma7455_data {
>>         struct regmap *regmap;
>> -       struct device *dev;
>>  };
>>
>>  static int mma7455_drdy(struct mma7455_data *mma7455)
>>  {
>> +       struct device *dev = regmap_get_device(mma7455->regmap);
> 
> ah, nice!
> 
> Acked-by: Joachim Eastwood <manabian@xxxxxxxxx>
Applied to the togreg  branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.

This one is a fairly standard case and can be easily chased through to
see that the device pointer is the same one either way.

I'm going to let the rest sit a little longer to see if we get more
feedback on them

Jonathan
> 
> 
> regards,
> Joachim Eastwood
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux