linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Ranostay <matt.ranostay@konsulko.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 38/38] iio:health:max30102: Drop of_match_ptr and use generic fw accessors
Date: Tue, 15 Sep 2020 11:54:19 -0700	[thread overview]
Message-ID: <CAJCx=gme_HbQeCu7x1_9Oi=hos_nptoBy3BseVHEsX-DC+PLdg@mail.gmail.com> (raw)
In-Reply-To: <20200910173242.621168-39-jic23@kernel.org>

On Thu, Sep 10, 2020 at 10:36 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> This enables use of the driver with ACPI PRP0001 and also removes
> an antipattern that I am trying to clear out of IIO to avoid
> it being coppied into new drivers.

Typo, should be copied.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Matt Ranostay <matt.ranostay@konsulko.com>

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

> ---
>  drivers/iio/health/max30102.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
> index bb504e993f19..543021d8df34 100644
> --- a/drivers/iio/health/max30102.c
> +++ b/drivers/iio/health/max30102.c
> @@ -19,7 +19,7 @@
>  #include <linux/irq.h>
>  #include <linux/i2c.h>
>  #include <linux/mutex.h>
> -#include <linux/of.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/regmap.h>
>  #include <linux/iio/iio.h>
>  #include <linux/iio/buffer.h>
> @@ -323,11 +323,10 @@ static int max30102_get_current_idx(unsigned int val, int *reg)
>  static int max30102_led_init(struct max30102_data *data)
>  {
>         struct device *dev = &data->client->dev;
> -       struct device_node *np = dev->of_node;
>         unsigned int val;
>         int reg, ret;
>
> -       ret = of_property_read_u32(np, "maxim,red-led-current-microamp", &val);
> +       ret = device_property_read_u32(dev, "maxim,red-led-current-microamp", &val);
>         if (ret) {
>                 dev_info(dev, "no red-led-current-microamp set\n");
>
> @@ -346,7 +345,7 @@ static int max30102_led_init(struct max30102_data *data)
>                 return ret;
>
>         if (data->chip_id == max30105) {
> -               ret = of_property_read_u32(np,
> +               ret = device_property_read_u32(dev,
>                         "maxim,green-led-current-microamp", &val);
>                 if (ret) {
>                         dev_info(dev, "no green-led-current-microamp set\n");
> @@ -368,7 +367,7 @@ static int max30102_led_init(struct max30102_data *data)
>                         return ret;
>         }
>
> -       ret = of_property_read_u32(np, "maxim,ir-led-current-microamp", &val);
> +       ret = device_property_read_u32(dev, "maxim,ir-led-current-microamp", &val);
>         if (ret) {
>                 dev_info(dev, "no ir-led-current-microamp set\n");
>
> @@ -624,7 +623,7 @@ MODULE_DEVICE_TABLE(of, max30102_dt_ids);
>  static struct i2c_driver max30102_driver = {
>         .driver = {
>                 .name   = MAX30102_DRV_NAME,
> -               .of_match_table = of_match_ptr(max30102_dt_ids),
> +               .of_match_table = max30102_dt_ids,
>         },
>         .probe          = max30102_probe,
>         .remove         = max30102_remove,
> --
> 2.28.0
>

  reply	other threads:[~2020-09-15 18:55 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 17:32 [PATCH 00/38] iio: remaining easy of_match_ptr removal and related Jonathan Cameron
2020-09-10 17:32 ` [PATCH 01/38] iio:potentiometer:ad5272: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 02/38] iio:potentiometer:ds1803: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 03/38] iio:potentiometer:max5432: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-21 14:24   ` Martin Kaiser
2020-09-10 17:32 ` [PATCH 04/38] iio:potentiometer:max5481: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 05/38] iio:potentiometer:max5481: Drop invalid ACPI binding Jonathan Cameron
2020-09-14  8:07   ` Andy Shevchenko
2020-09-10 17:32 ` [PATCH 06/38] iio:potentiometer:mcp4018: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 07/38] iio:potentiometer:mcp4131: Drop of_match_ptr and use generic fw interfaces Jonathan Cameron
2020-09-10 17:32 ` [PATCH 08/38] iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 09/38] iio:dac:ad5446: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 10/38] iio:dac:ad5592r: Drop of_match_ptr and ACPI_PTR protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 11/38] iio:dac:ad5593r: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 12/38] iio:dac:ad7303: Drop of_match_ptr protection Jonathan Cameron
2020-09-10 17:32 ` [PATCH 13/38] iio:dac:mcp4725: drop of_match_ptr and use generic fw properties Jonathan Cameron
2020-09-10 17:32 ` [PATCH 14/38] iio:dac:ti-dac082s085: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 15/38] iio:dac:ti-dac5571: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 16/38] iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-15 18:59   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 17/38] iio:pressure:icp10100: Drop of_match_ptr and CONFIG_OF protections Jonathan Cameron
2020-09-10 17:32 ` [PATCH 18/38] iio:pressure:ms5611: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 19/38] iio:pressure:ms5637: Drop of_match_ptr protection Jonathan Cameron
2020-09-10 17:32 ` [PATCH 20/38] iio:pressure:zpa2326: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 21/38] iio:temperature:tsys01: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 22/38] iio:temperature:tmp007: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 23/38] iio:resolver:ad2s1200: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 24/38] iio:chemical:ams-iaq-core: " Jonathan Cameron
2020-09-15 18:55   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 25/38] iio:chemical:atlas-sensor: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-15 18:59   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 26/38] iio:chemical:sgp30: Use local variable dev to simplify code Jonathan Cameron
2020-09-10 17:32 ` [PATCH 27/38] iio:chemical:sgp30: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-10 17:32 ` [PATCH 28/38] iio:chemical:vz89x: Introduce local struct device pointer Jonathan Cameron
2020-09-15 19:02   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 29/38] iio:chemical:vz89x: Drop of_match_ptr protection and use generic fw accessors Jonathan Cameron
2020-09-15 19:03   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 30/38] iio:humidity:hdc100x: Drop of_match_ptr protection Jonathan Cameron
2020-09-15 18:59   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 31/38] iio:proximity:as3935: Use local struct device pointer to simplify code Jonathan Cameron
2020-09-15 18:56   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 32/38] iio:proximity:as3935: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-15 18:55   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 33/38] iio:proximity:pulsedlight: Drop of_match_ptr protection Jonathan Cameron
2020-09-15 18:55   ` Matt Ranostay
2020-09-10 17:32 ` [PATCH 34/38] iio:magn:ak8975: Drop of_match_ptr and ACPI_PTR protections Jonathan Cameron
2020-09-11 18:59   ` Jonathan Albrieux
2020-09-10 17:32 ` [PATCH 35/38] iio:magn:ak8974: Drop of_match_ptr protection Jonathan Cameron
2020-09-29 12:40   ` Linus Walleij
2020-09-10 17:32 ` [PATCH 36/38] iio:humidity:htu21: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 37/38] iio:humidity:si7020: " Jonathan Cameron
2020-09-10 17:32 ` [PATCH 38/38] iio:health:max30102: Drop of_match_ptr and use generic fw accessors Jonathan Cameron
2020-09-15 18:54   ` Matt Ranostay [this message]
2020-09-14  8:04 ` [PATCH 00/38] iio: remaining easy of_match_ptr removal and related Andy Shevchenko
2020-09-17 18:17   ` Jonathan Cameron

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='CAJCx=gme_HbQeCu7x1_9Oi=hos_nptoBy3BseVHEsX-DC+PLdg@mail.gmail.com' \
    --to=matt.ranostay@konsulko.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@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;
as well as URLs for NNTP newsgroup(s).