Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1372256

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

From Joachim Eastwood <manabian@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct device
Date 2016-04-06 09:40 +0200
Message-ID <rkQee-sD-3@gated-at.bofh.it> (permalink)
References <rkO2K-7uk-9@gated-at.bofh.it> <rkO2K-7uk-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Alison,

On 6 April 2016 at 07:18, Alison Schofield <amsfield22@gmail.com> 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@gmail.com>
> ---
>  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@gmail.com>


regards,
Joachim Eastwood

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct device Alison Schofield <amsfield22@gmail.com> - 2016-04-06 07:20 +0200
  Re: [PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct device Joachim Eastwood <manabian@gmail.com> - 2016-04-06 09:40 +0200
    Re: [PATCH 5/9] iio: accel: mma7455: use regmap to retrieve struct  device Jonathan Cameron <jic23@kernel.org> - 2016-04-10 16:00 +0200

csiph-web