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

power/supply: surface_battery: Use client device wrappers for notifier registration

Use newly introduced client device wrapper functions for notifier
registration and unregistration.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220527023447.2460025-7-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Maximilian Luz and committed by
Hans de Goede
b49ba26b f80345b8

+2 -2
+2 -2
drivers/power/supply/surface_battery.c
··· 802 802 if (IS_ERR(bat->psy)) 803 803 return PTR_ERR(bat->psy); 804 804 805 - return ssam_notifier_register(bat->sdev->ctrl, &bat->notif); 805 + return ssam_device_notifier_register(bat->sdev, &bat->notif); 806 806 } 807 807 808 808 ··· 837 837 { 838 838 struct spwr_battery_device *bat = ssam_device_get_drvdata(sdev); 839 839 840 - ssam_notifier_unregister(sdev->ctrl, &bat->notif); 840 + ssam_device_notifier_unregister(sdev, &bat->notif); 841 841 cancel_delayed_work_sync(&bat->update_work); 842 842 } 843 843