mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Joshua Crofts <crofts@kernel.org>
Cc: "Roman Vivchar via B4 Relay"
	<devnull+rva333.protonmail.com@kernel.org>,
	rva333@protonmail.com, "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] iio: light: stk3310: add vdd regulator support
Date: Thu, 19 Nov 2026 03:32:38 +0000	[thread overview]
Message-ID: <20261119033238.39bff7a7@jic23-hlaptop> (raw)
In-Reply-To: <20261118110138.000003ab@kernel.org>

On Wed, 18 Nov 2026 11:01:38 +0100
Joshua Crofts <crofts@kernel.org> wrote:

> On Tue, 17 Nov 2026 20:08:37 +0200
> Roman Vivchar via B4 Relay <devnull+rva333.protonmail.com@kernel.org> wrote:
> 
> > @@ -745,6 +746,10 @@ static int stk3310_probe(struct i2c_client *client)
> >  	device_property_read_u32(&client->dev, "proximity-near-level",
> >  				 &data->ps_near_level);
> >  
> > +	ret = devm_regulator_get_enable(dev, "vdd");
> > +	if (ret)
> > +		return dev_err_probe(dev, ret, "failed to get vdd supply\n");
> > +  
> 
> IMO this should work, but I don't like the mixing of devm_* and non-devm_*
> functions, this may cause issues down the road. Consider moving the driver
> to all devm_* functions?

In this particular case I agree with you because the conversion is very
simple.  Generally the rule of thumb is that devm from start of probe
until you decide to stop, then no more devm.  In that case the unwind
order should be correct.  This change doesn't break that, but the
driver already breaks this wrt to the interrupt, so if Roman
doesn't mind would be great to fix it whilst touching the driver.

Jonathan



  reply	other threads:[~2026-11-19  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 18:08 [PATCH v2 0/4] iio: light: stk3310: stk3337 support + vdd supply Roman Vivchar via B4 Relay
2026-11-17 18:08 ` [PATCH v2 1/4] dt-bindings: iio: light: stk33xx: add power supply support Roman Vivchar via B4 Relay
2026-11-18 18:12   ` Conor Dooley
2026-11-19  3:29     ` Jonathan Cameron
2026-11-17 18:08 ` [PATCH v2 2/4] dt-bindings: iio: light: stk33xx: add stk3337 Roman Vivchar via B4 Relay
2026-11-18 18:11   ` Conor Dooley
2026-11-17 18:08 ` [PATCH v2 3/4] iio: light: stk3310: add vdd regulator support Roman Vivchar via B4 Relay
2026-11-18 10:01   ` Joshua Crofts
2026-11-19  3:32     ` Jonathan Cameron [this message]
2026-11-17 18:08 ` [PATCH v2 4/4] iio: light: stk3310: add stk3337 support Roman Vivchar via B4 Relay
2026-11-18 10:03   ` Joshua Crofts

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=20261119033238.39bff7a7@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=crofts@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+rva333.protonmail.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=rva333@protonmail.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

all inboxes | Powered by JetHome®