提交 262235b1 编写于 作者: E Eduardo Valentin 提交者: Greg Kroah-Hartman

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: NEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f1553334
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册