Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>
Subject: Re: [PATCH v4 4/4] iio: adc: ti-ads7950: complete conversion to using managed resources
Date: Mon, 30 Mar 2026 02:24:52 -0700	[thread overview]
Message-ID: <671889B9-1D36-4F00-B044-0173A13F7403@gmail.com> (raw)
In-Reply-To: <CAMRc=MdP-fvm4WWgFdHabCnVbc=rV943YhwrCHaCH9VCo_ZJJg@mail.gmail.com>

On March 30, 2026 2:20:33 AM PDT, Bartosz Golaszewski <brgl@kernel.org> wrote:
>On Mon, 30 Mar 2026 00:47:09 +0200, Dmitry Torokhov
><dmitry.torokhov@gmail.com> said:
>> All resources that the driver needs have managed API now. Switch to
>> using them to make code clearer and drop ti_ads7950_remove().
>>
>> Reviewed-by: David Lechner <dlechner@baylibre.com>
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> ---
>> -
>
>[snip]
>
>> -static void ti_ads7950_remove(struct spi_device *spi)
>> -{
>> -	struct iio_dev *indio_dev = spi_get_drvdata(spi);
>> -	struct ti_ads7950_state *st = iio_priv(indio_dev);
>> -
>> -	gpiochip_remove(&st->chip);
>> -	iio_device_unregister(indio_dev);
>> -	iio_triggered_buffer_cleanup(indio_dev);
>> -	mutex_destroy(&st->slock);
>
>That's a functional change, there's no corresponding conversion to using
>devm_mutex_init().

devm_mutex_init() makes absolutely no sense, as well as having mutex_destroy() in remove(). The memory containing the mutex will be released right after. 

-- 
Dmitry

  reply	other threads:[~2026-03-30  9:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 22:47 [PATCH v4 0/4] ti-ads7950: fix gpio handling and facelift Dmitry Torokhov
2026-03-29 22:47 ` [PATCH v4 1/4] iio: adc: ti-ads7950: switch to using guard() notation Dmitry Torokhov
2026-03-30  9:15   ` Bartosz Golaszewski
2026-03-30  9:18     ` Dmitry Torokhov
2026-03-30  9:21       ` Bartosz Golaszewski
2026-04-12 18:36         ` Jonathan Cameron
2026-03-29 22:47 ` [PATCH v4 2/4] iio: adc: ti-ads7950: simplify check for spi_setup() failures Dmitry Torokhov
2026-03-30  9:15   ` Bartosz Golaszewski
2026-03-29 22:47 ` [PATCH v4 3/4] iio: adc: ti-ads7950: switch to using devm_regulator_get_enable_read_voltage() Dmitry Torokhov
2026-03-30  9:17   ` Bartosz Golaszewski
2026-03-29 22:47 ` [PATCH v4 4/4] iio: adc: ti-ads7950: complete conversion to using managed resources Dmitry Torokhov
2026-03-30  9:20   ` Bartosz Golaszewski
2026-03-30  9:24     ` Dmitry Torokhov [this message]
2026-03-30 10:15       ` Andy Shevchenko

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=671889B9-1D36-4F00-B044-0173A13F7403@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=brgl@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).