mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
slg5bm43670: Update slg5bm43670 for Kernel 5.10
Fix the build error when making the slg5bm43670.ko. Also Kernel 5.10 removed the regulator locking and locking is implicit around the notifier call chain. Hence remove it for kernel 5.10 and beyond. Change-Id: I475868ae49f8fbbd7514fa43df41a3cd78d138ae Signed-off-by: Ravi Vembu <raviv@motorola.com> Mot-CRs-Fixed: (CR) Reviewed-on: https://gerrit.mot.com/1975249 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jian Luan <jamesluan@motorola.com> Reviewed-by: Ling Jin <lingjin@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
0f97c8d407
commit
bc98ea156c
2 changed files with 17 additions and 13 deletions
|
|
@ -1,10 +1,14 @@
|
|||
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
|
||||
all: modules
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
|
||||
|
||||
modules_install:
|
||||
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
|
||||
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
|
||||
|
||||
%:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
|
||||
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
|
||||
rm -rf .tmp_versions
|
||||
|
|
|
|||
|
|
@ -423,17 +423,17 @@ static irqreturn_t slg51000_irq_handler(int irq, void *data)
|
|||
for (i = 0; i < SLG51000_MAX_REGULATORS; i++) {
|
||||
if (!(evt[i][R2] & SLG51000_IRQ_ILIM_FLAG_MASK) &&
|
||||
(evt[i][R0] & SLG51000_EVT_ILIM_FLAG_MASK)) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) && LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
regulator_lock(chip->rdev[i]);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
mutex_lock(&chip->rdev[i]->mutex);
|
||||
#endif
|
||||
regulator_notifier_call_chain(chip->rdev[i],
|
||||
REGULATOR_EVENT_OVER_CURRENT,
|
||||
NULL);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) && LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
regulator_unlock(chip->rdev[i]);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
mutex_unlock(&chip->rdev[i]->mutex);
|
||||
#endif
|
||||
if (evt[i][R1] & SLG51000_STA_ILIM_FLAG_MASK)
|
||||
|
|
@ -448,17 +448,17 @@ static irqreturn_t slg51000_irq_handler(int irq, void *data)
|
|||
for (i = 0; i < SLG51000_MAX_REGULATORS; i++) {
|
||||
if (!(evt[i][R1] & SLG51000_STA_ILIM_FLAG_MASK) &&
|
||||
(evt[i][R1] & SLG51000_STA_VOUT_OK_FLAG_MASK)) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) && LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
regulator_lock(chip->rdev[i]);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
mutex_lock(&chip->rdev[i]->mutex);
|
||||
#endif
|
||||
regulator_notifier_call_chain(chip->rdev[i],
|
||||
REGULATOR_EVENT_OVER_TEMP,
|
||||
NULL);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0) && LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
regulator_unlock(chip->rdev[i]);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
mutex_unlock(&chip->rdev[i]->mutex);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue