Skip to content

Commit a052f07

Browse files
committed
mfd: atmel-flexcom: remove #ifdef CONFIG_PM_SLEEP
Remove compilation flag and use __maybe_unused and pm_ptr instead. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 472493c commit a052f07

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/mfd/atmel-flexcom.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ static const struct of_device_id atmel_flexcom_of_match[] = {
8787
};
8888
MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match);
8989

90-
#ifdef CONFIG_PM_SLEEP
91-
static int atmel_flexcom_resume(struct device *dev)
90+
static int __maybe_unused atmel_flexcom_resume(struct device *dev)
9291
{
9392
struct atmel_flexcom *ddata = dev_get_drvdata(dev);
9493
int err;
@@ -105,7 +104,6 @@ static int atmel_flexcom_resume(struct device *dev)
105104

106105
return 0;
107106
}
108-
#endif
109107

110108
static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL,
111109
atmel_flexcom_resume);
@@ -114,7 +112,7 @@ static struct platform_driver atmel_flexcom_driver = {
114112
.probe = atmel_flexcom_probe,
115113
.driver = {
116114
.name = "atmel_flexcom",
117-
.pm = &atmel_flexcom_pm_ops,
115+
.pm = pm_ptr(&atmel_flexcom_pm_ops),
118116
.of_match_table = atmel_flexcom_of_match,
119117
},
120118
};

0 commit comments

Comments
 (0)