[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250709164728.2d01c89d@jic23-huawei>
Date: Wed, 9 Jul 2025 16:47:28 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Linus Walleij <linus.walleij@...aro.org>, David Lechner
<dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
Shevchenko <andy@...nel.org>, Gerald Loacker
<gerald.loacker@...fvision.net>, Barnabás Czémán
<barnabas.czeman@...nlining.org>, Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org>, Danila Tikhonov <danila@...xyga.com>,
Neil Armstrong <neil.armstrong@...aro.org>, Waqar Hameed
<waqar.hameed@...s.com>, Peter Zijlstra <peterz@...radead.org>, David
Laight <david.laight@...lab.com>, Jakob Hauser <jahau@...ketmail.com>, Al
Viro <viro@...iv.linux.org.uk>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 09/12] iio: magnetometer: Remove redundant
pm_runtime_mark_last_busy() calls
On Wed, 9 Jul 2025 02:11:52 +0300
Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
> index 761daead5ada..7c5fef79ad04 100644
> --- a/drivers/iio/magnetometer/bmc150_magn.c
> +++ b/drivers/iio/magnetometer/bmc150_magn.c
> @@ -260,12 +260,10 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
> #ifdef CONFIG_PM
This is here just to handle the annoying stub for put_autosuspend which returns
an error code... To me not checking that is fine and would allow this
function to be squashed inline.
> int ret;
>
> - if (on) {
> + if (on)
> ret = pm_runtime_resume_and_get(data->dev);
> - } else {
> - pm_runtime_mark_last_busy(data->dev);
> + else
> ret = pm_runtime_put_autosuspend(data->dev);
> - }
>
> if (ret < 0) {
> dev_err(data->dev,
Powered by blists - more mailing lists