* [PATCH] staging: iio: hmc5843: Set iio name property in sysfs
@ 2015-02-28 20:54 Marek Belisko
2015-03-08 11:28 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Marek Belisko @ 2015-02-28 20:54 UTC (permalink / raw)
To: jic23, gregkh; +Cc: linux-iio, devel, linux-kernel, hns, Marek Belisko
Without this change file name for hmc5843 is empty in
/sys/bus/iio/devices/iio\:device*/name
With this change name is reported correctly:
cat /sys/bus/iio/devices/iio\:device*/name
hmc5843
Signed-off-by: Marek Belisko <marek@goldelico.com>
---
drivers/staging/iio/magnetometer/hmc5843_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c
index fd171d8..90cc18b 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_core.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
@@ -592,6 +592,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
mutex_init(&data->lock);
indio_dev->dev.parent = dev;
+ indio_dev->name = dev->driver->name;
indio_dev->info = &hmc5843_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = data->variant->channels;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: iio: hmc5843: Set iio name property in sysfs
2015-02-28 20:54 [PATCH] staging: iio: hmc5843: Set iio name property in sysfs Marek Belisko
@ 2015-03-08 11:28 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-03-08 11:28 UTC (permalink / raw)
To: Marek Belisko, gregkh; +Cc: linux-iio, devel, linux-kernel, hns
On 28/02/15 20:54, Marek Belisko wrote:
> Without this change file name for hmc5843 is empty in
> /sys/bus/iio/devices/iio\:device*/name
>
> With this change name is reported correctly:
> cat /sys/bus/iio/devices/iio\:device*/name
> hmc5843
>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
Good catch, thanks.
Applied to the fixes-togreg branch of iio.git.
Jonathan
> ---
> drivers/staging/iio/magnetometer/hmc5843_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c
> index fd171d8..90cc18b 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843_core.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
> @@ -592,6 +592,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
> mutex_init(&data->lock);
>
> indio_dev->dev.parent = dev;
> + indio_dev->name = dev->driver->name;
> indio_dev->info = &hmc5843_info;
> indio_dev->modes = INDIO_DIRECT_MODE;
> indio_dev->channels = data->variant->channels;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-08 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 20:54 [PATCH] staging: iio: hmc5843: Set iio name property in sysfs Marek Belisko
2015-03-08 11:28 ` Jonathan Cameron
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).