public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Anup Sharma <anupnewsmail@gmail.com>
Cc: <jic23@kernel.org>, <lars@metafoo.de>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: light : max44009 : Convert to i2c's .probe_new()
Date: Tue, 10 Jan 2023 17:07:08 +0000	[thread overview]
Message-ID: <20230110170708.00001054@huawei.com> (raw)
In-Reply-To: <Y72Py9i91MEYFzH2@yoga>

On Tue, 10 Jan 2023 21:48:19 +0530
Anup Sharma <anupnewsmail@gmail.com> wrote:

> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
This driver didn't get converted due to a mess up by me when applying patches.
I've now picked up Uwe's original patch.

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=testing&id=22cd9320b11a2eb05e5d490863a4219ca32e8ec9

> ---
>  drivers/iio/light/max44009.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/light/max44009.c b/drivers/iio/light/max44009.c
> index 801e5a0ad496..3dadace09fe2 100644
> --- a/drivers/iio/light/max44009.c
> +++ b/drivers/iio/light/max44009.c
> @@ -487,8 +487,7 @@ static irqreturn_t max44009_threaded_irq_handler(int irq, void *p)
>  	return IRQ_NONE;
>  }
>  
> -static int max44009_probe(struct i2c_client *client,
> -			  const struct i2c_device_id *id)
> +static int max44009_probe(struct i2c_client *client)
>  {
>  	struct max44009_data *data;
>  	struct iio_dev *indio_dev;
> @@ -538,7 +537,7 @@ static struct i2c_driver max44009_driver = {
>  	.driver = {
>  		.name = MAX44009_DRV_NAME,
>  	},
> -	.probe = max44009_probe,
> +	.probe_new = max44009_probe,
>  	.id_table = max44009_id,
>  };
>  module_i2c_driver(max44009_driver);


      reply	other threads:[~2023-01-10 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 16:18 [PATCH] iio: light : max44009 : Convert to i2c's .probe_new() Anup Sharma
2023-01-10 17:07 ` Jonathan Cameron [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=20230110170708.00001054@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=anupnewsmail@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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