diff --git a/drivers/misc/sx933x/Kbuild b/drivers/misc/sx933x/Kbuild index 8d6acdfc681c..173ee9e70999 100644 --- a/drivers/misc/sx933x/Kbuild +++ b/drivers/misc/sx933x/Kbuild @@ -6,6 +6,10 @@ ifneq (,$(filter river%,$(TARGET_PRODUCT))) EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL endif +ifneq (,$(filter odin%,$(TARGET_PRODUCT))) +EXTRA_CFLAGS += -DCONFIG_CAPSENSE_USB_CAL +endif + KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../sensors/Module.symvers sx932x_sar-y := sx933x_sar.o diff --git a/drivers/misc/sx933x/sx933x_sar.c b/drivers/misc/sx933x/sx933x_sar.c index 24360fe2e1c9..36bbe983d65e 100644 --- a/drivers/misc/sx933x/sx933x_sar.c +++ b/drivers/misc/sx933x/sx933x_sar.c @@ -817,7 +817,11 @@ static int ps_notify_callback(struct notifier_block *self, bool present; int retval; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) + if (event == PSY_EVENT_PROP_CHANGED +#else if ((event == PSY_EVENT_PROP_ADDED || event == PSY_EVENT_PROP_CHANGED) +#endif && psy && psy->desc->get_property && psy->desc->name && !strncmp(psy->desc->name, "usb", sizeof("usb")) && data) { LOG_INFO("ps notification: event = %lu\n", event);