Skip to content

Commit

Permalink
staging: ti-soc-thermal: fix device removal
Browse files Browse the repository at this point in the history
While removing, the device needs to unregister
the sensor from thermal framework. Before
calling the call back the driver needs to check
if the call back is registered. This patch
fix the check by checking the right callback.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Eduardo Valentin authored and Greg Kroah-Hartman committed Apr 8, 2013
1 parent f155333 commit 262235b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/ti-soc-thermal/ti-bandgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ int ti_bandgap_remove(struct platform_device *pdev)

/* First thing is to remove sensor interfaces */
for (i = 0; i < bgp->conf->sensor_count; i++) {
if (bgp->conf->sensors[i].register_cooling)
if (bgp->conf->sensors[i].unregister_cooling)
bgp->conf->sensors[i].unregister_cooling(bgp, i);

if (bgp->conf->remove_sensor)
Expand Down

0 comments on commit 262235b

Please sign in to comment.