Linux IIO development
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-kernel@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 6/9] iio: common: cros_ec_sensors: simplify getting .driver_data
Date: Thu, 23 Sep 2021 11:16:47 +0200	[thread overview]
Message-ID: <716533b5-380d-be72-b45e-d9909f09286b@collabora.com> (raw)
In-Reply-To: <20210920090522.23784-7-wsa+renesas@sang-engineering.com>

Hi Wolfram,

On 20/9/21 11:05, Wolfram Sang wrote:
> We should get 'driver_data' from 'struct device' directly. Going via
> platform_device is an unneeded step back and forth.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

I'm fine to pick this patch through chrome-platform tree if Jonathan is fine, or
can go through his tree.

I plan also to pick patch  "[PATCH 8/9] platform: chrome: cros_ec_sensorhub:
simplify getting .driver_data"

Thanks,
  Enric

> ---
> 
> Build tested only. buildbot is happy.
> 
>  drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> index 28bde13003b7..b2725c6adc7f 100644
> --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
> @@ -831,8 +831,7 @@ EXPORT_SYMBOL_GPL(cros_ec_sensors_core_write);
>  
>  static int __maybe_unused cros_ec_sensors_resume(struct device *dev)
>  {
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct iio_dev *indio_dev = platform_get_drvdata(pdev);
> +	struct iio_dev *indio_dev = dev_get_drvdata(dev);
>  	struct cros_ec_sensors_core_state *st = iio_priv(indio_dev);
>  	int ret = 0;
>  
> 

  reply	other threads:[~2021-09-23  9:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  9:05 [PATCH 0/9] treewide: simplify getting .driver_data Wolfram Sang
2021-09-20  9:05 ` [PATCH 6/9] iio: common: cros_ec_sensors: " Wolfram Sang
2021-09-23  9:16   ` Enric Balletbo i Serra [this message]
2021-09-25 14:54     ` Jonathan Cameron
2021-10-12  7:31       ` Wolfram Sang
2021-10-12  8:31         ` Jonathan Cameron
2021-10-15 17:22 ` [PATCH 0/9] treewide: " Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=716533b5-380d-be72-b45e-d9909f09286b@collabora.com \
    --to=enric.balletbo@collabora.com \
    --cc=bleung@chromium.org \
    --cc=groeck@chromium.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox