Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758022AbcDFHfw (ORCPT ); Wed, 6 Apr 2016 03:35:52 -0400 Received: from mail-ig0-f193.google.com ([209.85.213.193]:33456 "EHLO mail-ig0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbcDFHfv (ORCPT ); Wed, 6 Apr 2016 03:35:51 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 6 Apr 2016 09:35:49 +0200 Message-ID: Subject: Re: [PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct device From: Joachim Eastwood To: Alison Schofield Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Kukjin Kim , =?UTF-8?Q?Krzysztof_Koz=C5=82owski?= , linux-iio@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 978 Lines: 35 Hi Alison, On 6 April 2016 at 07:18, Alison Schofield 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 > --- > 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 regards, Joachim Eastwood