Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'psy-fixes' into psy-next

+13 -3
+12 -2
drivers/power/supply/surface_battery.c
··· 345 345 struct spwr_battery_device *bat = container_of(nf, struct spwr_battery_device, notif); 346 346 int status; 347 347 348 + /* 349 + * We cannot use strict matching when registering the notifier as the 350 + * EC expects us to register it against instance ID 0. Strict matching 351 + * would thus drop events, as those may have non-zero instance IDs in 352 + * this subsystem. So we need to check the instance ID of the event 353 + * here manually. 354 + */ 355 + if (event->instance_id != bat->sdev->uid.instance) 356 + return 0; 357 + 348 358 dev_dbg(&bat->sdev->dev, "power event (cid = %#04x, iid = %#04x, tid = %#04x)\n", 349 359 event->command_id, event->instance_id, event->target_id); 350 360 ··· 730 720 bat->notif.base.fn = spwr_notify_bat; 731 721 bat->notif.event.reg = registry; 732 722 bat->notif.event.id.target_category = sdev->uid.category; 733 - bat->notif.event.id.instance = 0; 734 - bat->notif.event.mask = SSAM_EVENT_MASK_STRICT; 723 + bat->notif.event.id.instance = 0; /* need to register with instance 0 */ 724 + bat->notif.event.mask = SSAM_EVENT_MASK_TARGET; 735 725 bat->notif.event.flags = SSAM_EVENT_SEQUENCED; 736 726 737 727 bat->psy_desc.name = bat->name;
+1 -1
drivers/power/supply/surface_charger.c
··· 66 66 67 67 static int spwr_ac_update_unlocked(struct spwr_ac_device *ac) 68 68 { 69 - u32 old = ac->state; 69 + __le32 old = ac->state; 70 70 int status; 71 71 72 72 lockdep_assert_held(&ac->lock);