mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove CONFIG_WAKELOCK, CONFIG_HAS_EARLYSUSPEND, and CONFIG_ANDROID_POWER
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
549cb92f47
commit
fc326e6a07
5 changed files with 2 additions and 216 deletions
|
@ -746,82 +746,28 @@ void rtw_yield_os(void)
|
|||
#define RTW_SUSPEND_EXT_LOCK_NAME "rtw_wifi_ext"
|
||||
|
||||
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
static struct wake_lock rtw_suspend_lock;
|
||||
static struct wake_lock rtw_suspend_ext_lock;
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
static android_suspend_lock_t rtw_suspend_lock ={
|
||||
.name = RTW_SUSPEND_LOCK_NAME
|
||||
};
|
||||
static android_suspend_lock_t rtw_suspend_ext_lock ={
|
||||
.name = RTW_SUSPEND_EXT_LOCK_NAME
|
||||
};
|
||||
#endif
|
||||
|
||||
inline void rtw_suspend_lock_init(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_init(&rtw_suspend_lock, WAKE_LOCK_SUSPEND, RTW_SUSPEND_LOCK_NAME);
|
||||
wake_lock_init(&rtw_suspend_ext_lock, WAKE_LOCK_SUSPEND, RTW_SUSPEND_EXT_LOCK_NAME);
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_init_suspend_lock(&rtw_suspend_lock);
|
||||
android_init_suspend_ext_lock(&rtw_suspend_ext_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_suspend_lock_uninit(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_destroy(&rtw_suspend_lock);
|
||||
wake_lock_destroy(&rtw_suspend_ext_lock);
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_uninit_suspend_lock(&rtw_suspend_lock);
|
||||
android_uninit_suspend_lock(&rtw_suspend_ext_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_lock_suspend(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock(&rtw_suspend_lock);
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_lock_suspend(&rtw_suspend_lock);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WAKELOCK) || defined(CONFIG_ANDROID_POWER)
|
||||
/* DBG_88E("####%s: suspend_lock_count:%d####\n", __FUNCTION__, rtw_suspend_lock.stat.count); */
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_unlock_suspend(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_unlock(&rtw_suspend_lock);
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_unlock_suspend(&rtw_suspend_lock);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_WAKELOCK) || defined(CONFIG_ANDROID_POWER)
|
||||
/* DBG_88E("####%s: suspend_lock_count:%d####\n", __FUNCTION__, rtw_suspend_lock.stat.count); */
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_lock_suspend_timeout(u32 timeout_ms)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_timeout(&rtw_suspend_lock, rtw_ms_to_systime(timeout_ms));
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_lock, rtw_ms_to_systime(timeout_ms));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_lock_ext_suspend_timeout(u32 timeout_ms)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_timeout(&rtw_suspend_ext_lock, rtw_ms_to_systime(timeout_ms));
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_ext_lock, rtw_ms_to_systime(timeout_ms));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ATOMIC_SET(ATOMIC_T *v, int i)
|
||||
|
|
|
@ -1276,14 +1276,10 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
|
|||
dvobj->processing_dev_remove = true;
|
||||
rtw_unregister_netdevs(dvobj);
|
||||
|
||||
if (usb_drv->drv_registered == true)
|
||||
{
|
||||
if (usb_drv->drv_registered == true) {
|
||||
/* DBG_88E("r871xu_dev_remove():padapter->bSurpriseRemoved == true\n"); */
|
||||
padapter->bSurpriseRemoved = true;
|
||||
}
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_ANDROID_POWER)
|
||||
rtw_unregister_early_suspend(dvobj_to_pwrctl(dvobj));
|
||||
#endif
|
||||
|
||||
rtw_pm_set_ips(padapter, IPS_NONE);
|
||||
rtw_pm_set_lps(padapter, PS_MODE_ACTIVE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue