From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Shreeya Patel <shreeya.patel@collabora.com>,
jic23@kernel.org, lars@metafoo.de
Cc: krisman@collabora.com, kernel@collabora.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: light: tsl2583: Fix module unloading
Date: Thu, 25 Aug 2022 21:53:09 +0300 [thread overview]
Message-ID: <793d9ca8-47af-2f3d-6079-e0bbb8e7d898@collabora.com> (raw)
In-Reply-To: <20220825092048.136973-1-shreeya.patel@collabora.com>
Hi,
On 8/25/22 12:20, Shreeya Patel wrote:
> tsl2583 uses devm_iio_device_register() function and
> calling iio_device_unregister() in remove breaks the
> module unloading.
> Fix this by removing call to iio_device_unregister()
> from tsl2583_remove().
>
> Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com>
Stable and fixes tags are missing
> ---
> drivers/iio/light/tsl2583.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
> index 82662dab87c0..36c25f79e6a6 100644
> --- a/drivers/iio/light/tsl2583.c
> +++ b/drivers/iio/light/tsl2583.c
> @@ -878,8 +878,6 @@ static int tsl2583_remove(struct i2c_client *client)
> struct iio_dev *indio_dev = i2c_get_clientdata(client);
> struct tsl2583_chip *chip = iio_priv(indio_dev);
>
> - iio_device_unregister(indio_dev);
> -
> pm_runtime_disable(&client->dev);
> pm_runtime_set_suspended(&client->dev);
>
Driver removal sequence should be opposite to the registration order.
Could be better not to use the devm in this case.
--
Best regards,
Dmitry
next prev parent reply other threads:[~2022-08-25 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 9:20 Shreeya Patel
2022-08-25 18:53 ` Dmitry Osipenko [this message]
2022-08-28 16:22 ` 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=793d9ca8-47af-2f3d-6079-e0bbb8e7d898@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=jic23@kernel.org \
--cc=kernel@collabora.com \
--cc=krisman@collabora.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shreeya.patel@collabora.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®