From: Jonathan Cameron <jic23@kernel.org>
To: Gregor Boirie <gregor.boirie@parrot.com>, linux-iio@vger.kernel.org
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Tomasz Duszynski <tduszyns@gmail.com>,
Daniel Baluta <daniel.baluta@intel.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Mark Brown <broonie@kernel.org>, "Andrew F. Davis" <afd@ti.com>
Subject: Re: [PATCH v3 2/6] iio:pressure:ms5611: use probed device name
Date: Sun, 21 Feb 2016 20:52:37 +0000 [thread overview]
Message-ID: <56CA2395.2000009@kernel.org> (raw)
In-Reply-To: <ed9f6b13f9f5327e6c15758389058e9367cc8014.1455731233.git.gregor.boirie@parrot.com>
On 17/02/16 17:52, Gregor Boirie wrote:
> From: Grégor Boirie <gregor.boirie@parrot.com>
>
> Use name of probed device instead of driver's one when registering device.
>
> Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
*fingers crossed no one is relying on this bit of ABI*
Should definitely have always been as you have it now.
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/pressure/ms5611.h | 3 ++-
> drivers/iio/pressure/ms5611_core.c | 5 +++--
> drivers/iio/pressure/ms5611_i2c.c | 2 +-
> drivers/iio/pressure/ms5611_spi.c | 4 ++--
> 4 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/pressure/ms5611.h b/drivers/iio/pressure/ms5611.h
> index 2d70dd6..8b08e4b 100644
> --- a/drivers/iio/pressure/ms5611.h
> +++ b/drivers/iio/pressure/ms5611.h
> @@ -51,7 +51,8 @@ struct ms5611_state {
> struct ms5611_chip_info *chip_info;
> };
>
> -int ms5611_probe(struct iio_dev *indio_dev, struct device *dev, int type);
> +int ms5611_probe(struct iio_dev *indio_dev, struct device *dev,
> + const char* name, int type);
> int ms5611_remove(struct iio_dev *indio_dev);
>
> #endif /* _MS5611_H */
> diff --git a/drivers/iio/pressure/ms5611_core.c b/drivers/iio/pressure/ms5611_core.c
> index 84ab8d2..acd8e37 100644
> --- a/drivers/iio/pressure/ms5611_core.c
> +++ b/drivers/iio/pressure/ms5611_core.c
> @@ -298,7 +298,8 @@ static int ms5611_init(struct iio_dev *indio_dev)
> return ms5611_read_prom(indio_dev);
> }
>
> -int ms5611_probe(struct iio_dev *indio_dev, struct device *dev, int type)
> +int ms5611_probe(struct iio_dev *indio_dev, struct device *dev,
> + const char *name, int type)
> {
> int ret;
> struct ms5611_state *st = iio_priv(indio_dev);
> @@ -306,7 +307,7 @@ int ms5611_probe(struct iio_dev *indio_dev, struct device *dev, int type)
> mutex_init(&st->lock);
> st->chip_info = &chip_info_tbl[type];
> indio_dev->dev.parent = dev;
> - indio_dev->name = dev->driver->name;
> + indio_dev->name = name;
> indio_dev->info = &ms5611_info;
> indio_dev->channels = ms5611_channels;
> indio_dev->num_channels = ARRAY_SIZE(ms5611_channels);
> diff --git a/drivers/iio/pressure/ms5611_i2c.c b/drivers/iio/pressure/ms5611_i2c.c
> index 42706a8..ae67539 100644
> --- a/drivers/iio/pressure/ms5611_i2c.c
> +++ b/drivers/iio/pressure/ms5611_i2c.c
> @@ -105,7 +105,7 @@ static int ms5611_i2c_probe(struct i2c_client *client,
> st->read_adc_temp_and_pressure = ms5611_i2c_read_adc_temp_and_pressure;
> st->client = client;
>
> - return ms5611_probe(indio_dev, &client->dev, id->driver_data);
> + return ms5611_probe(indio_dev, &client->dev, id->name, id->driver_data);
> }
>
> static int ms5611_i2c_remove(struct i2c_client *client)
> diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c
> index c4bf4e8..5cc009e 100644
> --- a/drivers/iio/pressure/ms5611_spi.c
> +++ b/drivers/iio/pressure/ms5611_spi.c
> @@ -105,8 +105,8 @@ static int ms5611_spi_probe(struct spi_device *spi)
> st->read_adc_temp_and_pressure = ms5611_spi_read_adc_temp_and_pressure;
> st->client = spi;
>
> - return ms5611_probe(indio_dev, &spi->dev,
> - spi_get_device_id(spi)->driver_data);
> + return ms5611_probe(indio_dev, &spi->dev, spi_get_device_id(spi)->name,
> + spi_get_device_id(spi)->driver_data);
> }
>
> static int ms5611_spi_remove(struct spi_device *spi)
>
next prev parent reply other threads:[~2016-02-21 20:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 17:52 [PATCH v3 0/6] iio:pressure:ms5611: fix and enhancements Gregor Boirie
2016-02-17 17:52 ` [PATCH v3 1/6] iio:pressure:ms5611: fix ms5607 temp compensation Gregor Boirie
2016-02-21 20:51 ` Jonathan Cameron
2016-02-17 17:52 ` [PATCH v3 2/6] iio:pressure:ms5611: use probed device name Gregor Boirie
2016-02-21 20:52 ` Jonathan Cameron [this message]
2016-02-17 17:52 ` [PATCH v3 3/6] iio:pressure:ms5611: power regulator support Gregor Boirie
2016-02-21 20:53 ` Jonathan Cameron
2016-02-17 17:52 ` [PATCH v3 4/6] iio:pressure:ms5611: DT bindings documentation Gregor Boirie
2016-02-21 21:00 ` Jonathan Cameron
2016-02-17 17:52 ` [PATCH v3 5/6] iio:pressure:ms5611: oversampling rate support Gregor Boirie
2016-02-21 21:02 ` Jonathan Cameron
2016-02-17 17:52 ` [PATCH v3 6/6] iio:pressure:ms5611: continuous sampling support Gregor Boirie
2016-02-17 21:09 ` Jonathan Cameron
2016-02-18 10:18 ` Gregor Boirie
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=56CA2395.2000009@kernel.org \
--to=jic23@kernel.org \
--cc=afd@ti.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=gregor.boirie@parrot.com \
--cc=k.kozlowski@samsung.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=tduszyns@gmail.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;
as well as URLs for NNTP newsgroup(s).