diff options
author | Moon Yeounsu <yyyynoom@gmail.com> | 2024-08-10 16:15:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-08-14 13:20:55 +0200 |
commit | 2984e69a24affc8e5624069b7bb44593e09037e8 (patch) | |
tree | 3725c95c64091dae5d6fa1d3cb7ce18bdb60ba72 /drivers/net/ethernet/dlink | |
parent | net: dsa: microchip: ksz9477: unwrap URL in comment (diff) | |
download | linux-2984e69a24affc8e5624069b7bb44593e09037e8.tar.xz linux-2984e69a24affc8e5624069b7bb44593e09037e8.zip |
net: ethernet: dlink: replace deprecated macro
Macro `SIMPLE_DEV_PM_OPS()` is deprecated.
This patch replaces `SIMPLE_DEV_PM_OPS()` with
`DEFINE_SIMPLE_DEV_PM_OPS()` currently used.
Expanded results are the same since remaining
member is initialized as zero (NULL):
static SIMPLE_DEV_PM_OPS(rio_pm_ops, rio_suspend, rio_resume);
Expanded to:
static const struct dev_pm_ops __attribute__((__unused__)) rio_pm_ops = {
.suspend = ((1) ? ((rio_suspend)) : ((void *)0)),
.resume = ((1) ? ((rio_resume)) : ((void *)0)),
.freeze = ((1) ? ((rio_suspend)) : ((void *)0)),
.thaw = ((1) ? ((rio_resume)) : ((void *)0)),
.poweroff = ((1) ? ((rio_suspend)) : ((void *)0)),
.restore = ((1) ? ((rio_resume)) : ((void *)0)),
};
static DEFINE_SIMPLE_DEV_PM_OPS(rio_pm_ops, rio_suspend, rio_resume);
Expanded to:
static const struct dev_pm_ops rio_pm_ops = {
.suspend = ((1) ? ((rio_suspend)) : ((void *)0)),
.resume = ((1) ? ((rio_resume)) : ((void *)0)),
.freeze = ((1) ? ((rio_suspend)) : ((void *)0)),
.thaw = ((1) ? ((rio_resume)) : ((void *)0)),
.poweroff = ((1) ? ((rio_suspend)) : ((void *)0)),
.restore = ((1) ? ((rio_resume)) : ((void *)0)),
.runtime_suspend = ((void *)0),
.runtime_resume = ((void *)0),
.runtime_idle = ((void *)0),
};
Signed-off-by: Moon Yeounsu <yyyynoom@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dlink')
-rw-r--r-- | drivers/net/ethernet/dlink/dl2k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c index 7bfeae04b52b..d0ea92607870 100644 --- a/drivers/net/ethernet/dlink/dl2k.c +++ b/drivers/net/ethernet/dlink/dl2k.c @@ -1842,7 +1842,7 @@ static int rio_resume(struct device *device) return 0; } -static SIMPLE_DEV_PM_OPS(rio_pm_ops, rio_suspend, rio_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(rio_pm_ops, rio_suspend, rio_resume); #define RIO_PM_OPS (&rio_pm_ops) #else |