You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
net: rfkill: rfkill-wlan: Fix compilation error when enable early suspend
net/rfkill/rfkill-wlan.c:697:22: error: redefinition of 'wlan_early_suspend' as different kind of symbol Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: Id439523b64fa9fc99b5208c0c2a811e157fd5a9c
This commit is contained in:
@@ -694,11 +694,11 @@ static void wlan_late_resume(struct early_suspend *h)
|
||||
return;
|
||||
}
|
||||
|
||||
struct early_suspend wlan_early_suspend {
|
||||
.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20;
|
||||
.suspend = wlan_early_suspend;
|
||||
.resume = wlan_late_resume;
|
||||
}
|
||||
static struct early_suspend wlan_early_suspend_handler = {
|
||||
.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20,
|
||||
.suspend = wlan_early_suspend,
|
||||
.resume = wlan_late_resume,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void
|
||||
@@ -888,7 +888,7 @@ static int rfkill_wlan_probe(struct platform_device *pdev)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND)
|
||||
register_early_suspend(wlan_early_suspend);
|
||||
register_early_suspend(&wlan_early_suspend_handler);
|
||||
#endif
|
||||
|
||||
fb_register_client(&rfkill_wlan_fb_notifier);
|
||||
@@ -917,6 +917,10 @@ static int rfkill_wlan_remove(struct platform_device *pdev)
|
||||
|
||||
fb_unregister_client(&rfkill_wlan_fb_notifier);
|
||||
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND)
|
||||
unregister_early_suspend(&wlan_early_suspend_handler);
|
||||
#endif
|
||||
|
||||
if (gpio_is_valid(rfkill->pdata->power_n.io))
|
||||
gpio_free(rfkill->pdata->power_n.io);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user