···345345 struct spwr_battery_device *bat = container_of(nf, struct spwr_battery_device, notif);346346 int status;347347348348+ /*349349+ * We cannot use strict matching when registering the notifier as the350350+ * EC expects us to register it against instance ID 0. Strict matching351351+ * would thus drop events, as those may have non-zero instance IDs in352352+ * this subsystem. So we need to check the instance ID of the event353353+ * here manually.354354+ */355355+ if (event->instance_id != bat->sdev->uid.instance)356356+ return 0;357357+348358 dev_dbg(&bat->sdev->dev, "power event (cid = %#04x, iid = %#04x, tid = %#04x)\n",349359 event->command_id, event->instance_id, event->target_id);350360···730720 bat->notif.base.fn = spwr_notify_bat;731721 bat->notif.event.reg = registry;732722 bat->notif.event.id.target_category = sdev->uid.category;733733- bat->notif.event.id.instance = 0;734734- bat->notif.event.mask = SSAM_EVENT_MASK_STRICT;723723+ bat->notif.event.id.instance = 0; /* need to register with instance 0 */724724+ bat->notif.event.mask = SSAM_EVENT_MASK_TARGET;735725 bat->notif.event.flags = SSAM_EVENT_SEQUENCED;736726737727 bat->psy_desc.name = bat->name;
+1-1
drivers/power/supply/surface_charger.c
···66666767static int spwr_ac_update_unlocked(struct spwr_ac_device *ac)6868{6969- u32 old = ac->state;6969+ __le32 old = ac->state;7070 int status;71717272 lockdep_assert_held(&ac->lock);