mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
mmi_wake_lock: Resolve malloc build error
Use common mmi_wake_lock macros instead directly using kernel API, which is version specific. kmalloc parameter missed. Change-Id: Ieb49c659e8612cd81ca1333e6a6a8c57bf7b7476 Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com> Reviewed-on: https://gerrit.mot.com/1729315 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com> Reviewed-by: Zhenxin Xi <xizx@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
e56d9dfe53
commit
0c7b6ca774
1 changed files with 4 additions and 1 deletions
|
|
@ -13,8 +13,10 @@
|
|||
#ifndef _MMI_WAKE_LOCK_H
|
||||
#define _MMI_WAKE_LOCK_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/pm_wakeup.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define PM_STAY_AWAKE(_wakeup_source) __pm_stay_awake(_wakeup_source);
|
||||
#define PM_RELAX(_wakeup_source) __pm_relax(_wakeup_source);
|
||||
|
|
@ -30,7 +32,8 @@
|
|||
_wakeup_source = wakeup_source_register(_name);
|
||||
#else
|
||||
#define PM_WAKEUP_REGISTER(_dev, _wakeup_source, _name) { \
|
||||
_wakeup_source = (struct wakeup_source *)kmalloc(struct wakeup_source); \
|
||||
_wakeup_source = (struct wakeup_source *)kmalloc(sizeof(struct wakeup_source), GFP_KERNEL); \
|
||||
if(!_wakeup_source) return -ENOMEM; \
|
||||
wakeup_source_init(_wakeup_source, _name); \
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue