Skip to content

Commit 0897f17

Browse files
andy-shevwsakernel
authored andcommitted
i2c: designware-pci: use __maybe_unused for PM functions
Use __maybe_unused for PM functions instead of ifdeffery. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent c3c9bab commit 0897f17

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/i2c/busses/i2c-designware-pcidrv.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ static struct dw_pci_controller dw_pci_controllers[] = {
213213
},
214214
};
215215

216-
#ifdef CONFIG_PM
217-
static int i2c_dw_pci_suspend(struct device *dev)
216+
static int __maybe_unused i2c_dw_pci_suspend(struct device *dev)
218217
{
219218
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
220219

@@ -224,7 +223,7 @@ static int i2c_dw_pci_suspend(struct device *dev)
224223
return 0;
225224
}
226225

227-
static int i2c_dw_pci_resume(struct device *dev)
226+
static int __maybe_unused i2c_dw_pci_resume(struct device *dev)
228227
{
229228
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
230229
int ret;
@@ -234,7 +233,6 @@ static int i2c_dw_pci_resume(struct device *dev)
234233

235234
return ret;
236235
}
237-
#endif
238236

239237
static UNIVERSAL_DEV_PM_OPS(i2c_dw_pm_ops, i2c_dw_pci_suspend,
240238
i2c_dw_pci_resume, NULL);

0 commit comments

Comments
 (0)