Commit b49ba26b authored by Maximilian Luz's avatar Maximilian Luz Committed by Hans de Goede

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: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20220527023447.2460025-7-luzmaximilian@gmail.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent f80345b8
...@@ -802,7 +802,7 @@ static int spwr_battery_register(struct spwr_battery_device *bat) ...@@ -802,7 +802,7 @@ static int spwr_battery_register(struct spwr_battery_device *bat)
if (IS_ERR(bat->psy)) if (IS_ERR(bat->psy))
return PTR_ERR(bat->psy); return PTR_ERR(bat->psy);
return ssam_notifier_register(bat->sdev->ctrl, &bat->notif); return ssam_device_notifier_register(bat->sdev, &bat->notif);
} }
...@@ -837,7 +837,7 @@ static void surface_battery_remove(struct ssam_device *sdev) ...@@ -837,7 +837,7 @@ static void surface_battery_remove(struct ssam_device *sdev)
{ {
struct spwr_battery_device *bat = ssam_device_get_drvdata(sdev); struct spwr_battery_device *bat = ssam_device_get_drvdata(sdev);
ssam_notifier_unregister(sdev->ctrl, &bat->notif); ssam_device_notifier_unregister(sdev, &bat->notif);
cancel_delayed_work_sync(&bat->update_work); cancel_delayed_work_sync(&bat->update_work);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment