• Moon Yeounsu's avatar
    net: ethernet: dlink: replace deprecated macro · 2984e69a
    Moon Yeounsu authored
    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: default avatarMoon Yeounsu <yyyynoom@gmail.com>
    Reviewed-by: default avatarSimon Horman <horms@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2984e69a
dl2k.c 47.1 KB