[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aG4tiRHySSsQq_KN@smile.fi.intel.com>
Date: Wed, 9 Jul 2025 11:51:21 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Rui Miguel Silva <rmfrfs@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Julien Stephan <jstephan@...libre.com>,
Waqar Hameed <waqar.hameed@...s.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 06/12] iio: gyro: Remove redundant
pm_runtime_mark_last_busy() calls
On Wed, Jul 09, 2025 at 02:11:52AM +0300, Sakari Ailus 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().
...
> if (on)
> ret = pm_runtime_get_sync(dev);
> - else {
> - pm_runtime_mark_last_busy(dev);
> + else
> ret = pm_runtime_put_autosuspend(dev);
> - }
>
> if (ret < 0) {
More potential users! So, perhaps introduce a helper and then convert
altogether to use a new
/// choose better name
static inline int pm_runtime_toggle_sync(dev, on)
{
if (on)
return pm_runtime_get_sync(dev);
else // yes, I know it's redundant, just for the better view
return pm_runtime_put_autosuspend(dev);
}
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists