diff options
author | Grégor Boirie <gregor.boirie@parrot.com> | 2016-02-17 18:52:50 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-24 20:40:46 +0000 |
commit | eac635ebad41b4fa960386fd0b042764f275b4d4 (patch) | |
tree | b24b42f62461d30e3779950fd76909370f664cfa /drivers/iio/pressure/ms5611_core.c | |
parent | ce5b8fc163619067aab157008daf5719cd38fdd1 (diff) | |
download | linux-stable-eac635ebad41b4fa960386fd0b042764f275b4d4.tar.gz linux-stable-eac635ebad41b4fa960386fd0b042764f275b4d4.tar.bz2 linux-stable-eac635ebad41b4fa960386fd0b042764f275b4d4.zip |
iio:pressure:ms5611: use probed device name
Use name of probed device instead of driver's one when registering device.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure/ms5611_core.c')
-rw-r--r-- | drivers/iio/pressure/ms5611_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/pressure/ms5611_core.c b/drivers/iio/pressure/ms5611_core.c index 84ab8d234a7f..acd8e37195bc 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); |