File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
drivers/net/ethernet/stmicro/stmmac Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,6 @@ static void sti_dwmac_remove(struct platform_device *pdev)
313
313
clk_disable_unprepare (dwmac -> clk );
314
314
}
315
315
316
- #ifdef CONFIG_PM_SLEEP
317
316
static int sti_dwmac_suspend (struct device * dev )
318
317
{
319
318
struct sti_dwmac * dwmac = get_stmmac_bsp_priv (dev );
@@ -333,10 +332,9 @@ static int sti_dwmac_resume(struct device *dev)
333
332
334
333
return stmmac_resume (dev );
335
334
}
336
- #endif /* CONFIG_PM_SLEEP */
337
335
338
- static SIMPLE_DEV_PM_OPS (sti_dwmac_pm_ops , sti_dwmac_suspend ,
339
- sti_dwmac_resume ) ;
336
+ static DEFINE_SIMPLE_DEV_PM_OPS (sti_dwmac_pm_ops , sti_dwmac_suspend ,
337
+ sti_dwmac_resume ) ;
340
338
341
339
static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
342
340
.fix_retime_src = stih4xx_fix_retime_src ,
@@ -353,7 +351,7 @@ static struct platform_driver sti_dwmac_driver = {
353
351
.remove = sti_dwmac_remove ,
354
352
.driver = {
355
353
.name = "sti-dwmac" ,
356
- .pm = & sti_dwmac_pm_ops ,
354
+ .pm = pm_sleep_ptr ( & sti_dwmac_pm_ops ) ,
357
355
.of_match_table = sti_dwmac_match ,
358
356
},
359
357
};
You can’t perform that action at this time.
0 commit comments