mfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Subsystems (4)
PATCH v2 1/1 mfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the deprecated SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr().
This allows us to drop the __maybe_unused annotations from PM callbacks. This is a straightforward cleanup with no functional change intended.
---
Changes in v2:
- Change commit message prefix from "drivers/mfd: " to "mfd: ".
- Wrap to 75 ish chars for commit messages.
--- drivers/mfd/iqs62x.c | 8 ++++---- drivers/mfd/max77843.c | 8 ++++---- drivers/mfd/mt6360-core.c | 8 ++++---- drivers/mfd/rk8xx-i2c.c | 4 ++-- drivers/mfd/rn5t618.c | 8 ++++---- drivers/mfd/ti_am335x_tscadc.c | 8 ++++---- drivers/mfd/tps6586x.c | 8 ++++---- drivers/mfd/twl-core.c | 8 ++++---- 8 files changed, 30 insertions(+), 30 deletions(-)
drivers/mfd/iqs62x.c +4 -4
@@ -1015,7 +1015,7 @@ static void iqs62x_remove(struct i2c_client *client)wait_for_completion (&iqs62x->fw_done); } -static int __maybe_unused iqs62x_suspend (struct device *dev) +static int iqs62x_suspend (struct device *dev) {struct iqs62x_core *iqs62x =dev_get_drvdata (dev);int ret;
@@ -1036,7 +1036,7 @@ static int __maybe_unused iqs62x_suspend(struct device *dev) IQS62X_PWR_SETTINGS_PWR_MODE_HALT); } -static int __maybe_unused iqs62x_resume (struct device *dev) +static int iqs62x_resume (struct device *dev) {struct iqs62x_core *iqs62x =dev_get_drvdata (dev);int ret;
@@ -1051,7 +1051,7 @@ static int __maybe_unused iqs62x_resume(struct device *dev) IQS62X_PWR_SETTINGS_DIS_AUTO, 0); } -static SIMPLE_DEV_PM_OPS(iqs62x_pm, iqs62x_suspend, iqs62x_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(iqs62x_pm, iqs62x_suspend, iqs62x_resume);static const struct of_device_id iqs62x_of_match[] = { { .compatible ="azoteq,iqs620a" },
@@ -1067,7 +1067,7 @@ static struct i2c_driver iqs62x_i2c_driver = { .driver = { .name = "iqs62x", .of_match_table = iqs62x_of_match, - .pm = &iqs62x_pm, + .pm = pm_sleep_ptr(&iqs62x_pm), }, .probe = iqs62x_probe, .remove = iqs62x_remove,
drivers/mfd/max77843.c +4 -4
@@ -173,7 +173,7 @@ static const struct i2c_device_id max77843_id[] = { { }, }; -static int __maybe_unused max77843_suspend (struct device *dev) +static int max77843_suspend (struct device *dev) {struct i2c_client *i2c =to_i2c_client (dev);struct max77693_dev *max77843 =i2c_get_clientdata (i2c);
@@ -185,7 +185,7 @@ static int __maybe_unused max77843_suspend(struct device *dev)return 0 ; } -static int __maybe_unused max77843_resume (struct device *dev) +static int max77843_resume (struct device *dev) {struct i2c_client *i2c =to_i2c_client (dev);struct max77693_dev *max77843 =i2c_get_clientdata (i2c);
@@ -197,12 +197,12 @@ static int __maybe_unused max77843_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(max77843_pm, max77843_suspend, max77843_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(max77843_pm, max77843_suspend, max77843_resume);static struct i2c_driver max77843_i2c_driver = { .driver = { .name ="max77843" , - .pm = &max77843_pm, + .pm =pm_sleep_ptr (&max77843_pm), .of_match_table = max77843_dt_match, .suppress_bind_attrs = true, },
drivers/mfd/mt6360-core.c +4 -4
@@ -583,7 +583,7 @@ static int mt6360_probe(struct i2c_client *client)return 0 ; } -static int __maybe_unused mt6360_suspend (struct device *dev) +static int mt6360_suspend (struct device *dev) {struct i2c_client *i2c =to_i2c_client (dev);
@@ -593,7 +593,7 @@ static int __maybe_unused mt6360_suspend(struct device *dev)return 0 ; } -static int __maybe_unused mt6360_resume (struct device *dev) +static int mt6360_resume (struct device *dev) {struct i2c_client *i2c =to_i2c_client (dev);
@@ -604,7 +604,7 @@ static int __maybe_unused mt6360_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(mt6360_pm_ops, mt6360_suspend, mt6360_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mt6360_pm_ops, mt6360_suspend, mt6360_resume);static const struct of_device_id __maybe_unused mt6360_of_id[] = { { .compatible ="mediatek,mt6360" , },
@@ -615,7 +615,7 @@ MODULE_DEVICE_TABLE(of, mt6360_of_id);static struct i2c_driver mt6360_driver = { .driver = { .name ="mt6360" , - .pm = &mt6360_pm_ops, + .pm =pm_sleep_ptr (&mt6360_pm_ops), .of_match_table =of_match_ptr (mt6360_of_id), }, .probe = mt6360_probe,
drivers/mfd/rk8xx-i2c.c +2 -2
@@ -251,7 +251,7 @@ static void rk8xx_i2c_shutdown(struct i2c_client *client)rk8xx_shutdown (&client->dev); } -static SIMPLE_DEV_PM_OPS(rk8xx_i2c_pm_ops, rk8xx_suspend, rk8xx_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(rk8xx_i2c_pm_ops, rk8xx_suspend, rk8xx_resume);static const struct of_device_id rk8xx_i2c_of_match[] = { { .compatible ="rockchip,rk801" , .data = &rk801_data },
@@ -270,7 +270,7 @@ static struct i2c_driver rk8xx_i2c_driver = { .driver = { .name = "rk8xx-i2c", .of_match_table = rk8xx_i2c_of_match, - .pm = &rk8xx_i2c_pm_ops, + .pm = pm_sleep_ptr(&rk8xx_i2c_pm_ops), }, .probe = rk8xx_i2c_probe, .shutdown = rk8xx_i2c_shutdown,
drivers/mfd/rn5t618.c +4 -4
@@ -243,7 +243,7 @@ static void rn5t618_i2c_remove(struct i2c_client *i2c)unregister_restart_handler (&rn5t618_restart_handler); } -static int __maybe_unused rn5t618_i2c_suspend (struct device *dev) +static int rn5t618_i2c_suspend (struct device *dev) {struct rn5t618 *priv =dev_get_drvdata (dev);
@@ -253,7 +253,7 @@ static int __maybe_unused rn5t618_i2c_suspend(struct device *dev)return 0 ; } -static int __maybe_unused rn5t618_i2c_resume (struct device *dev) +static int rn5t618_i2c_resume (struct device *dev) {struct rn5t618 *priv =dev_get_drvdata (dev);
@@ -263,7 +263,7 @@ static int __maybe_unused rn5t618_i2c_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(rn5t618_i2c_dev_pm_ops, +static DEFINE_SIMPLE_DEV_PM_OPS(rn5t618_i2c_dev_pm_ops, rn5t618_i2c_suspend, rn5t618_i2c_resume);
@@ -271,7 +271,7 @@ static struct i2c_driver rn5t618_i2c_driver = { .driver = { .name = "rn5t618", .of_match_table = rn5t618_of_match, - .pm = &rn5t618_i2c_dev_pm_ops, + .pm = pm_sleep_ptr(&rn5t618_i2c_dev_pm_ops), }, .probe = rn5t618_i2c_probe, .remove = rn5t618_i2c_remove,
drivers/mfd/ti_am335x_tscadc.c +4 -4
@@ -313,7 +313,7 @@ static int __maybe_unused ti_tscadc_can_wakeup(struct device *dev, void *data)return device_may_wakeup (dev); } -static int __maybe_unused tscadc_suspend (struct device *dev) +static int tscadc_suspend (struct device *dev) {struct ti_tscadc_dev *tscadc =dev_get_drvdata (dev);
@@ -331,7 +331,7 @@ static int __maybe_unused tscadc_suspend(struct device *dev)return 0 ; } -static int __maybe_unused tscadc_resume (struct device *dev) +static int tscadc_resume (struct device *dev) {struct ti_tscadc_dev *tscadc =dev_get_drvdata (dev);
@@ -345,7 +345,7 @@ static int __maybe_unused tscadc_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(tscadc_pm_ops, tscadc_suspend, tscadc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(tscadc_pm_ops, tscadc_suspend, tscadc_resume);static const struct ti_tscadc_data tscdata = { .adc_feature_name ="TI-am335x-adc" ,
@@ -373,7 +373,7 @@ MODULE_DEVICE_TABLE(of, ti_tscadc_dt_ids);static struct platform_driver ti_tscadc_driver = { .driver = { .name ="ti_am3359-tscadc" , - .pm = &tscadc_pm_ops, + .pm =pm_sleep_ptr (&tscadc_pm_ops), .of_match_table = ti_tscadc_dt_ids, }, .probe = ti_tscadc_probe,
drivers/mfd/tps6586x.c +4 -4
@@ -618,7 +618,7 @@ static void tps6586x_i2c_remove(struct i2c_client *client)free_irq (client->irq, tps6586x); } -static int __maybe_unused tps6586x_i2c_suspend (struct device *dev) +static int tps6586x_i2c_suspend (struct device *dev) {struct tps6586x *tps6586x =dev_get_drvdata (dev);
@@ -628,7 +628,7 @@ static int __maybe_unused tps6586x_i2c_suspend(struct device *dev)return 0 ; } -static int __maybe_unused tps6586x_i2c_resume (struct device *dev) +static int tps6586x_i2c_resume (struct device *dev) {struct tps6586x *tps6586x =dev_get_drvdata (dev);
@@ -638,7 +638,7 @@ static int __maybe_unused tps6586x_i2c_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend, +static DEFINE_SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend, tps6586x_i2c_resume);static const struct i2c_device_id tps6586x_id_table[] = {
@@ -651,7 +651,7 @@ static struct i2c_driver tps6586x_driver = { .driver = { .name = "tps6586x", .of_match_table = of_match_ptr(tps6586x_of_match), - .pm = &tps6586x_pm_ops, + .pm = pm_sleep_ptr(&tps6586x_pm_ops), }, .probe = tps6586x_i2c_probe, .remove = tps6586x_i2c_remove,
drivers/mfd/twl-core.c +4 -4
@@ -903,7 +903,7 @@ twl_probe(struct i2c_client *client)return status; } -static int __maybe_unused twl_suspend (struct device *dev) +static int twl_suspend (struct device *dev) {struct i2c_client *client =to_i2c_client (dev);
@@ -913,7 +913,7 @@ static int __maybe_unused twl_suspend(struct device *dev)return 0 ; } -static int __maybe_unused twl_resume (struct device *dev) +static int twl_resume (struct device *dev) {struct i2c_client *client =to_i2c_client (dev);
@@ -923,7 +923,7 @@ static int __maybe_unused twl_resume(struct device *dev)return 0 ; } -static SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume);static const struct i2c_device_id twl_ids[] = { {"twl4030" ,TWL4030_VAUX2 },/* "Triton 2" */
@@ -942,7 +942,7 @@ static const struct i2c_device_id twl_ids[] = {/* One Client Driver , 4 Clients */ static struct i2c_driver twl_driver = { .driver.name =DRIVER_NAME , - .driver.pm = &twl_dev_pm_ops, + .driver.pm =pm_sleep_ptr (&twl_dev_pm_ops), .id_table = twl_ids, .probe = twl_probe, .remove = twl_remove,
Signature · 1 line
2.53.0
Lee Jones
maintainerQuoted 11 lines · Triet Hoang
Convert the deprecated
SIMPLE_DEV_PM_OPS()toDEFINE_SIMPLE_DEV_PM_OPS()andpm_sleep_ptr().This allows us to drop the
__maybe_unusedannotations from PM callbacks. This is a straightforward cleanup with no functional change intended.Signed-off-by Triet Hoang <[email protected]>---
Changes in v2:
- Change commit message prefix from "drivers/mfd: " to "mfd: ".
- Wrap to 75 ish chars for commit messages.
Quoted 10 lines
--- drivers/mfd/iqs62x.c | 8 ++++---- drivers/mfd/max77843.c | 8 ++++---- drivers/mfd/mt6360-core.c | 8 ++++---- drivers/mfd/rk8xx-i2c.c | 4 ++-- drivers/mfd/rn5t618.c | 8 ++++---- drivers/mfd/ti_am335x_tscadc.c | 8 ++++---- drivers/mfd/tps6586x.c | 8 ++++---- drivers/mfd/twl-core.c | 8 ++++---- 8 files changed, 30 insertions(+), 30 deletions(-)
I have no issue with the patch, but I think that it's impolite not to include the other owners / contributors of these drivers:
% git show | ./scripts/get_maintainer.pl --file-emails --git-min-percent 75
Lee Jones <[email protected]> (maintainer:MULTIFUNCTION DEVICES (MFD))
Chanwoo Choi <[email protected]> (maintainer:MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BO...) Krzysztof Kozlowski <[email protected]> (maintainer:MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BO...) Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support) AngeloGioacchino Del Regno <[email protected]> (maintainer:ARM/Mediatek SoC support) Aaro Koskinen <[email protected]> (maintainer:OMAP2+ SUPPORT)
Andreas Kemnade <[email protected]> (maintainer:OMAP2+ SUPPORT)
Kevin Hilman <[email protected]> (maintainer:OMAP2+ SUPPORT)
Roger Quadros <[email protected]> (maintainer:OMAP2+ SUPPORT)
Tony Lindgren <[email protected]> (maintainer:OMAP2+ SUPPORT)
Jeff LaBundy <[email protected]> (in file)
Jaewon Kim <[email protected]> (in file)
Beomho Seo <[email protected]> (in file)
Gene Chen <[email protected]> (in file)
Chris Zhong <[email protected]> (in file)
Zhang Qing <[email protected]> (in file)
Wadim Egorov <[email protected]> (in file)
Beniamino Galvani <[email protected]> (in file)
Rachna Patil <[email protected]> (in file)
Mike Rapoport <[email protected]> (in file)
Eric Miao <[email protected]> (in file)
Kai Svahn <[email protected]> (in file)
syed khasim <[email protected]> (in file)
[email protected] (open list:MULTIFUNCTION DEVICES (MFD))
[email protected] (open list)
[email protected] (moderated list:ARM/Mediatek SoC support) [email protected] (moderated list:ARM/Mediatek SoC support) [email protected] (open list:OMAP2+ SUPPORT)
You can be more selective than this, but you get the idea.
Please resubmit as a [RESEND].
Signature · 1 line
Lee Jones
Re: (subset) [PATCH v2] mfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
In reply to Triet HoangQuoted 8 lines · Triet Hoang
Convert the deprecated
SIMPLE_DEV_PM_OPS()toDEFINE_SIMPLE_DEV_PM_OPS()andpm_sleep_ptr().This allows us to drop the
__maybe_unusedannotations from PM callbacks. This is a straightforward cleanup with no functional change intended.[...]
Applied, thanks!
[1/1] mfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
commit: 25d865396625ba1a4e85d09fd850ec93a93ffd10
--
Lee Jones [李琼斯]