mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
power/supply: surface_charger: 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-6-luzmaximilian@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
74bb2d0bc5
commit
f80345b89c
@ -216,7 +216,7 @@ static int spwr_ac_register(struct spwr_ac_device *ac)
|
||||
if (IS_ERR(ac->psy))
|
||||
return PTR_ERR(ac->psy);
|
||||
|
||||
return ssam_notifier_register(ac->sdev->ctrl, &ac->notif);
|
||||
return ssam_device_notifier_register(ac->sdev, &ac->notif);
|
||||
}
|
||||
|
||||
|
||||
@ -251,7 +251,7 @@ static void surface_ac_remove(struct ssam_device *sdev)
|
||||
{
|
||||
struct spwr_ac_device *ac = ssam_device_get_drvdata(sdev);
|
||||
|
||||
ssam_notifier_unregister(sdev->ctrl, &ac->notif);
|
||||
ssam_device_notifier_unregister(sdev, &ac->notif);
|
||||
}
|
||||
|
||||
static const struct spwr_psy_properties spwr_psy_props_adp1 = {
|
||||
|
Loading…
Reference in New Issue
Block a user