UPSTREAM: thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 9 Mar 2016 13:10:06 +0000 (18:40 +0530)
committerGerrit Code Review <gerrit@rock-chips.com>
Thu, 31 Mar 2016 07:06:57 +0000 (15:06 +0800)
commitf919aa0a80c0dd653706a92203fabc0c260cea35
treeff2418206010edd30c2c051870f55efe0d0b5e65
parent475567141493feb7fc5fa8704546e2ab1d028219
UPSTREAM: thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register

Add resource managed version of thermal_zone_of_sensor_register() and
thermal_zone_of_sensor_unregister().

This helps in reducing the code size in error path, remove of
driver remove callbacks and making proper sequence for deallocations.

Change-Id: Ie2e47805f398ff7b4f1dcc71e0581221d79ba9d2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit e498b4984db82b4ba3ceea7dba813222a31e9c2e)
drivers/thermal/of-thermal.c
include/linux/thermal.h