Skip to content

Commit 7433b2d

Browse files
committed
iio: adc: ad4630: make use of DEFINE_SIMPLE_DEV_PM_OPS()
Use the proper macros to define a PM struct in conjucntion with using pm_ptr(). Otherwise, we get compiler complains if PM is not enabled. Fixes: fecd9b7 ("iio: adc: ad4630: make use of pm_ptr()") Signed-off-by: Nuno Sá <[email protected]>
1 parent 600b3be commit 7433b2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/iio/adc/ad4630.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,9 +1585,8 @@ static int ad4630_runtime_resume(struct device *dev)
15851585
return 0;
15861586
}
15871587

1588-
static const struct dev_pm_ops ad4630_pm_ops = {
1589-
SET_RUNTIME_PM_OPS(ad4630_runtime_suspend, ad4630_runtime_resume, NULL)
1590-
};
1588+
static DEFINE_SIMPLE_DEV_PM_OPS(ad4630_pm_ops, ad4630_runtime_suspend,
1589+
ad4630_runtime_resume);
15911590

15921591
static const struct spi_device_id ad4630_id_table[] = {
15931592
{ "ad4030-24", (kernel_ulong_t)&ad4630_chip_info[ID_AD4030_24] },

0 commit comments

Comments
 (0)