public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH v1] iio: accel: st_accel: Use st_sensors_dev_name_probe()
Date: Wed, 29 Jan 2020 20:38:48 +0000	[thread overview]
Message-ID: <20200129203848.73dd3a9b@archlinux> (raw)
In-Reply-To: <20200120092550.39427-1-andriy.shevchenko@linux.intel.com>

On Mon, 20 Jan 2020 11:25:50 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use st_sensors_dev_name_probe() instead open coded variant.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to start poking at it.

Thanks,

Jonathan

> ---
>  drivers/iio/accel/st_accel_i2c.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
> index 633955d764cc..8c489312f668 100644
> --- a/drivers/iio/accel/st_accel_i2c.c
> +++ b/drivers/iio/accel/st_accel_i2c.c
> @@ -147,12 +147,9 @@ static int st_accel_i2c_probe(struct i2c_client *client)
>  	const struct st_sensor_settings *settings;
>  	struct st_sensor_data *adata;
>  	struct iio_dev *indio_dev;
> -	const char *match;
>  	int ret;
>  
> -	match = device_get_match_data(&client->dev);
> -	if (match)
> -		strlcpy(client->name, match, sizeof(client->name));
> +	st_sensors_dev_name_probe(&client->dev, client->name, sizeof(client->name));
>  
>  	settings = st_accel_get_settings(client->name);
>  	if (!settings) {


      reply	other threads:[~2020-01-29 20:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  9:25 [PATCH v1] iio: accel: st_accel: Use st_sensors_dev_name_probe() Andy Shevchenko
2020-01-29 20:38 ` Jonathan Cameron [this message]

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=20200129203848.73dd3a9b@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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