linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] iio: amplifiers: hmc425a: Make use of device properties
@ 2022-02-03 12:16 Andy Shevchenko
  2022-02-05 16:52 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-02-03 12:16 UTC (permalink / raw)
  To: Andy Shevchenko, linux-iio, linux-kernel
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron

Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/amplifiers/hmc425a.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
index 16c0a77f6a1c..ce80e0c916f4 100644
--- a/drivers/iio/amplifiers/hmc425a.c
+++ b/drivers/iio/amplifiers/hmc425a.c
@@ -11,10 +11,10 @@
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/slab.h>
 #include <linux/regulator/consumer.h>
 #include <linux/sysfs.h>
@@ -192,7 +192,7 @@ static int hmc425a_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	st = iio_priv(indio_dev);
-	st->type = (uintptr_t)of_device_get_match_data(&pdev->dev);
+	st->type = (uintptr_t)device_get_match_data(&pdev->dev);
 
 	st->chip_info = &hmc425a_chip_info_tbl[st->type];
 	indio_dev->num_channels = st->chip_info->num_channels;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] iio: amplifiers: hmc425a: Make use of device properties
  2022-02-03 12:16 [PATCH v1 1/1] iio: amplifiers: hmc425a: Make use of device properties Andy Shevchenko
@ 2022-02-05 16:52 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2022-02-05 16:52 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-iio, linux-kernel, Lars-Peter Clausen, Michael Hennerich

On Thu,  3 Feb 2022 14:16:24 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Convert the module to be property provider agnostic and allow
> it to be used on non-OF platforms.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Given how simple this one is, I'll apply it now.
Of course, if anyone notices problems I can back it out again
as won't be doing any pull requests for at least a week or two.

Applied,

Thanks,

Jonathan

> ---
>  drivers/iio/amplifiers/hmc425a.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
> index 16c0a77f6a1c..ce80e0c916f4 100644
> --- a/drivers/iio/amplifiers/hmc425a.c
> +++ b/drivers/iio/amplifiers/hmc425a.c
> @@ -11,10 +11,10 @@
>  #include <linux/iio/iio.h>
>  #include <linux/iio/sysfs.h>
>  #include <linux/kernel.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/module.h>
> -#include <linux/of_device.h>
> -#include <linux/of_platform.h>
>  #include <linux/platform_device.h>
> +#include <linux/property.h>
>  #include <linux/slab.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/sysfs.h>
> @@ -192,7 +192,7 @@ static int hmc425a_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	st = iio_priv(indio_dev);
> -	st->type = (uintptr_t)of_device_get_match_data(&pdev->dev);
> +	st->type = (uintptr_t)device_get_match_data(&pdev->dev);
>  
>  	st->chip_info = &hmc425a_chip_info_tbl[st->type];
>  	indio_dev->num_channels = st->chip_info->num_channels;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-05 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 12:16 [PATCH v1 1/1] iio: amplifiers: hmc425a: Make use of device properties Andy Shevchenko
2022-02-05 16:52 ` 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).