Skip to content

Commit

Permalink
power/supply: surface_battery: Use client device wrappers for notifie…
Browse files Browse the repository at this point in the history
…r registration

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

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
  • Loading branch information
qzed authored and intel-lab-lkp committed May 20, 2022
1 parent b5f0d28 commit fa862b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/power/supply/surface_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ static int spwr_battery_register(struct spwr_battery_device *bat)
if (IS_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);
}


Expand Down Expand Up @@ -837,7 +837,7 @@ static void surface_battery_remove(struct ssam_device *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);
}

Expand Down

0 comments on commit fa862b0

Please sign in to comment.