From 5ce0198d67f1486718156ae2492675029edf2338 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 18 Jul 2013 10:06:49 -0500 Subject: [PATCH] rtl8188eu: CONFIG_HAS_EARLYSUSPEND is not ever selected This configuration variable and its corresponding dead code are removed. Signed-off-by: Larry Finger --- core/rtw_pwrctrl.c | 63 ------------------------------------------- include/drv_conf.h | 5 ---- include/rtw_pwrctrl.h | 16 ----------- os_dep/usb_intf.c | 18 ------------- 4 files changed, 102 deletions(-) diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 9a846f6..0366011 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -1275,17 +1275,9 @@ _func_enter_; pwrctrlpriv->rtw_workqueue = create_singlethread_workqueue("rtw_workqueue"); #endif /* CONFIG_RESUME_IN_WORKQUEUE */ - #if defined(CONFIG_HAS_EARLYSUSPEND) - pwrctrlpriv->early_suspend.suspend = NULL; - rtw_register_early_suspend(pwrctrlpriv); - #endif /* CONFIG_HAS_EARLYSUSPEND */ - - _func_exit_; - } - void rtw_free_pwrctrl_priv(PADAPTER adapter) { struct pwrctrl_priv *pwrctrlpriv = &adapter->pwrctrlpriv; @@ -1302,11 +1294,6 @@ _func_enter_; } #endif - - #if defined(CONFIG_HAS_EARLYSUSPEND) - rtw_unregister_early_suspend(pwrctrlpriv); - #endif /* CONFIG_HAS_EARLYSUSPEND */ - _free_pwrlock(&pwrctrlpriv->lock); _func_exit_; @@ -1337,56 +1324,6 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) } #endif /* CONFIG_RESUME_IN_WORKQUEUE */ -#ifdef CONFIG_HAS_EARLYSUSPEND -extern int rtw_resume_process(_adapter *padapter); -static void rtw_early_suspend(struct early_suspend *h) -{ - struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend); - DBG_88E("%s\n",__func__); - - /* jeff: do nothing but set do_late_resume to false */ - pwrpriv->do_late_resume = false; -} - -static void rtw_late_resume(struct early_suspend *h) -{ - struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend); - _adapter *adapter = container_of(pwrpriv, _adapter, pwrctrlpriv); - - DBG_88E("%s\n",__func__); - if (pwrpriv->do_late_resume) { - rtw_resume_process(adapter); - pwrpriv->do_late_resume = false; - } -} - -void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv) -{ - DBG_88E("%s\n", __func__); - - /* jeff: set the early suspend level before blank screen, so we wll do late resume after scree is lit */ - pwrpriv->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20; - pwrpriv->early_suspend.suspend = rtw_early_suspend; - pwrpriv->early_suspend.resume = rtw_late_resume; - register_early_suspend(&pwrpriv->early_suspend); - - -} - -void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) -{ - DBG_88E("%s\n", __func__); - - pwrpriv->do_late_resume = false; - - if (pwrpriv->early_suspend.suspend) - unregister_early_suspend(&pwrpriv->early_suspend); - - pwrpriv->early_suspend.suspend = NULL; - pwrpriv->early_suspend.resume = NULL; -} -#endif /* CONFIG_HAS_EARLYSUSPEND */ - u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val) { u8 bResult = true; diff --git a/include/drv_conf.h b/include/drv_conf.h index dd65254..8c3dc52 100644 --- a/include/drv_conf.h +++ b/include/drv_conf.h @@ -21,11 +21,6 @@ #define __DRV_CONF_H__ #include "autoconf.h" -#if defined(CONFIG_HAS_EARLYSUSPEND) && defined (CONFIG_RESUME_IN_WORKQUEUE) - #warning "You have CONFIG_HAS_EARLYSUSPEND enabled in your system, we disable CONFIG_RESUME_IN_WORKQUEUE automatically" - #undef CONFIG_RESUME_IN_WORKQUEUE -#endif - #ifdef CONFIG_RESUME_IN_WORKQUEUE //this can be removed, because there is no case for this... #if !defined( CONFIG_WAKELOCK) #error "enable CONFIG_RESUME_IN_WORKQUEUE without CONFIG_WAKELOCK will suffer from the danger of wifi's unfunctionality..." diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 9581f54..27ef323 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -24,11 +24,6 @@ #include #include -#ifdef CONFIG_HAS_EARLYSUSPEND -#include -#endif //CONFIG_HAS_EARLYSUSPEND - - #define FW_PWR0 0 #define FW_PWR1 1 #define FW_PWR2 2 @@ -267,11 +262,6 @@ struct pwrctrl_priv struct workqueue_struct *rtw_workqueue; _workitem resume_work; #endif - - #ifdef CONFIG_HAS_EARLYSUSPEND - struct early_suspend early_suspend; - u8 do_late_resume; - #endif //CONFIG_HAS_EARLYSUSPEND }; #define rtw_get_ips_mode_req(pwrctrlpriv) \ @@ -335,12 +325,6 @@ void LPS_Leave(PADAPTER padapter); void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv); #endif //CONFIG_RESUME_IN_WORKQUEUE -#if defined(CONFIG_HAS_EARLYSUSPEND ) -#define rtw_is_earlysuspend_registered(pwrpriv) (pwrpriv)->early_suspend.suspend -void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv); -void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv); -#endif //CONFIG_HAS_EARLYSUSPEND - u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val); void rtw_set_ips_deny(_adapter *padapter, u32 ms); int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller); diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 5c1cebb..0d79b14 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -758,25 +758,11 @@ static int rtw_resume(struct usb_interface *pusb_intf) } else { #ifdef CONFIG_RESUME_IN_WORKQUEUE rtw_resume_in_workqueue(pwrpriv); -#elif defined(CONFIG_HAS_EARLYSUSPEND) -#ifdef CONFIG_WOWLAN - if (rtw_is_earlysuspend_registered(pwrpriv) && - !padapter->pwrctrlpriv.wowlan_mode) { -#else - if (rtw_is_earlysuspend_registered(pwrpriv)) { -#endif //CONFIG_WOWLAN - //jeff: bypass resume here, do in late_resume - pwrpriv->do_late_resume = true; - } else { - ret = rtw_resume_process(padapter); - } #else // Normal resume process ret = rtw_resume_process(padapter); #endif //CONFIG_RESUME_IN_WORKQUEUE } - return ret; - } int rtw_resume_process(_adapter *padapter) @@ -1442,10 +1428,6 @@ _func_enter_; padapter->hw_init_completed = false; }*/ -#if defined(CONFIG_HAS_EARLYSUSPEND) - rtw_unregister_early_suspend(&padapter->pwrctrlpriv); -#endif - rtw_pm_set_ips(padapter, IPS_NONE); rtw_pm_set_lps(padapter, PS_MODE_ACTIVE);