From: Guenter Roeck <linux@roeck-us.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Jean Delvare <jdelvare@suse.com>
Subject: Re: [PATCH v2 1/1] hwmon: (iio_hwmon) Make use of device properties
Date: Mon, 29 Aug 2022 06:37:16 -0700 [thread overview]
Message-ID: <20220829133716.GA3968626@roeck-us.net> (raw)
In-Reply-To: <20220826173700.17395-1-andriy.shevchenko@linux.intel.com>
On Fri, Aug 26, 2022 at 08:37:00PM +0300, Andy Shevchenko wrote:
> Convert the module to be property provider agnostic and allow
> it to be used on non-OF platforms.
>
> Include mod_devicetable.h explicitly to replace the dropped of.h
> which included mod_devicetable.h indirectly.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> v2: amended commit message (Guenter)
> drivers/hwmon/iio_hwmon.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c
> index 580a7d125b88..3aa40893fc09 100644
> --- a/drivers/hwmon/iio_hwmon.c
> +++ b/drivers/hwmon/iio_hwmon.c
> @@ -6,11 +6,13 @@
>
> #include <linux/kernel.h>
> #include <linux/slab.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> #include <linux/err.h>
> #include <linux/platform_device.h>
> +#include <linux/property.h>
> +
> #include <linux/hwmon.h>
> -#include <linux/of.h>
> #include <linux/hwmon-sysfs.h>
> #include <linux/iio/consumer.h>
> #include <linux/iio/types.h>
> @@ -149,8 +151,8 @@ static int iio_hwmon_probe(struct platform_device *pdev)
> st->attr_group.attrs = st->attrs;
> st->groups[0] = &st->attr_group;
>
> - if (dev->of_node) {
> - sname = devm_kasprintf(dev, GFP_KERNEL, "%pOFn", dev->of_node);
> + if (dev_fwnode(dev)) {
> + sname = devm_kasprintf(dev, GFP_KERNEL, "%pfwP", dev_fwnode(dev));
> if (!sname)
> return -ENOMEM;
> strreplace(sname, '-', '_');
prev parent reply other threads:[~2022-08-29 13:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 17:37 [PATCH v2 1/1] hwmon: (iio_hwmon) Make use of device properties Andy Shevchenko
2022-08-29 13:37 ` Guenter Roeck [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=20220829133716.GA3968626@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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