Re: [PATCH 4/6] iio: proximity: srf04: Use pm_ptr() to remove unused struct dev_pm_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun,  7 Aug 2022 19:56:16 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> If CONFIG_PM is not set, the pm_ptr() will ensure that the struct
> dev_pm_ops and callbacks are removed without the need for __maybe_unused
> markings.
> 
> In this case we can't simply use DEFINE_RUNTIME_DEV_PM_OPS() because
> that would provide suspend and resume functions without the
> checks the driver is doing before calling runtime_pm functions
> (whether the necessary GPIO is provided).  It may be possible to
> clean that up in future by moving the checks into the callbacks.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Andreas Klinger <ak@xxxxxxxxxxxxx>
Some consensus reached in the discussion so even though no one
gave a tag I feel comfortable taking this one.
The suggested follow up change needs hardware to boost confidence
that there are no side effects.

Applied.

Jonathan



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux