summaryrefslogtreecommitdiff
path: root/drivers/staging/ti-soc-thermal
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-04-08 12:19:14 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-08 17:35:09 (GMT)
commit262235b13c22f6b7f84173f350964e71a849067d (patch)
tree32d5c84ee6bf31f49f040cadfa4fd7ec209900ba /drivers/staging/ti-soc-thermal
parentf1553334236701f1c790d6dc800d8f327b6c5166 (diff)
downloadlinux-fsl-qoriq-262235b13c22f6b7f84173f350964e71a849067d.tar.xz
staging: ti-soc-thermal: fix device removal
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>
Diffstat (limited to 'drivers/staging/ti-soc-thermal')
-rw-r--r--drivers/staging/ti-soc-thermal/ti-bandgap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index 37fdba6..f20c1cf 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c
@@ -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)