Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Archit Anant <architanant5@gmail.com>
Cc: jic23@kernel.org, dlechner@baylibre.com, andy@kernel.org,
	nuno.sa@analog.com, u.kleine-koenig@baylibre.com,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: adc: ti-ads1015: use local device pointer in probe
Date: Sat, 18 Jul 2026 11:37:06 +0300	[thread overview]
Message-ID: <als7MldPd1WjCmDZ@ashevche-desk.local> (raw)
In-Reply-To: <20260718075016.27750-3-architanant5@gmail.com>

On Sat, Jul 18, 2026 at 01:20:15PM +0530, Archit Anant wrote:
> Introduce a local device pointer 'dev' in ads1015_probe to
> avoid accessing &client->dev repeatedly.

...

> static int ads1015_probe(struct i2c_client *client)

>  	struct ads1015_data *data;
>  	int ret;
>  	int i;
> +	struct device *dev = &client->dev;

Preserve reversed xmas tree order.

...

>  	chip = i2c_get_match_data(client);
>  	if (!chip)
> -		return dev_err_probe(&client->dev, -EINVAL, "Unknown chip\n");
> +		return dev_err_probe(dev, -EINVAL, "Unknown chip\n");

Side note: At some point we probably want to unify the error code for missing
driver data to be -ENODATA.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-07-18  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18  7:50 [PATCH 0/3] iio: adc: ti-ads1015: modernize resource management Archit Anant
2026-07-18  7:50 ` [PATCH 1/3] iio: adc: ti-ads1015: sort headers alphabetically Archit Anant
2026-07-18  7:50 ` [PATCH 2/3] iio: adc: ti-ads1015: use local device pointer in probe Archit Anant
2026-07-18  8:37   ` Andy Shevchenko [this message]
2026-07-18 21:48   ` Jonathan Cameron
2026-07-18  7:50 ` [PATCH 3/3] iio: adc: ti-ads1015: convert to fully managed resources Archit Anant
2026-07-18  8:39   ` Andy Shevchenko
2026-07-18 21:55   ` 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=als7MldPd1WjCmDZ@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=architanant5@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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