Re: [PATCH] i2c: qcom-geni: Use modern PM operation macros
Viken Dadhaniya <[email protected]> Wed, 5 Aug 2026 15:13:43 +0530
| Newsgroups | org.kernel.vger.linux-i2c,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Reviewed-by: Viken Dadhaniya <[email protected]> On 7/29/2026 1:00 PM, Mukesh Kumar Savaliya wrote: > The driver uses the legacy SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and > SET_RUNTIME_PM_OPS() helpers to initialize struct dev_pm_ops. > > Switch to the modern NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() > macros instead. These macros keep PM callbacks referenced by the > compiler and help avoid potential unused-function warnings in > configurations where PM support is disabled or partially enabled. > > No functional change intended. > > Signed-off-by: Mukesh Kumar Savaliya <[email protected]> > --- > drivers/i2c/busses/i2c-qcom-geni.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c > index d5c977e34994..71ae821dd147 100644 > --- a/drivers/i2c/busses/i2c-qcom-geni.c > +++ b/drivers/i2c/busses/i2c-qcom-geni.c > @@ -1163,7 +1163,7 @@ static void geni_i2c_shutdown(struct platform_device *pdev) > i2c_mark_adapter_suspended(&gi2c->adap); > } > > -static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev) > +static int geni_i2c_runtime_suspend(struct device *dev) > { > int ret = 0; > struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); > @@ -1181,7 +1181,7 @@ static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev) > return 0; > } > > -static int __maybe_unused geni_i2c_runtime_resume(struct device *dev) > +static int geni_i2c_runtime_resume(struct device *dev) > { > int ret = 0; > struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); > @@ -1197,7 +1197,7 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev) > return 0; > } > > -static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev) > +static int geni_i2c_suspend_noirq(struct device *dev) > { > struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); > int ret; > @@ -1211,7 +1211,7 @@ static int __maybe_unused geni_i2c_suspend_noirq(struct device *dev) > return ret; > } > > -static int __maybe_unused geni_i2c_resume_noirq(struct device *dev) > +static int geni_i2c_resume_noirq(struct device *dev) > { > struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); > int ret; > @@ -1225,9 +1225,10 @@ static int __maybe_unused geni_i2c_resume_noirq(struct device *dev) > } > > static const struct dev_pm_ops geni_i2c_pm_ops = { > - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq) > - SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume, > - NULL) > + NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, > + geni_i2c_resume_noirq) > + RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume, > + NULL) > }; > > static const struct geni_i2c_desc geni_i2c = {