summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2021-03-14 14:13:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-09 11:21:11 +0300
commitdcf5ffc91c91cf58c5f172e83daa34d5ea6b69fc (patch)
tree6075759a3c2d4c747c80badc67a4f213a5fd6330 /include
parent79098339ac2065f4b4352ef5921628970b6f47e6 (diff)
downloadlinux-dcf5ffc91c91cf58c5f172e83daa34d5ea6b69fc.tar.xz
thermal/drivers/core: Use a char pointer for the cooling device name
[ Upstream commit 58483761810087e5ffdf36e84ac1bf26df909097 ] We want to have any kind of name for the cooling devices as we do no longer want to rely on auto-numbering. Let's replace the cooling device's fixed array by a char pointer to be allocated dynamically when registering the cooling device, so we don't limit the length of the name. Rework the error path at the same time as we have to rollback the allocations in case of error. Tested with a dummy device having the name: "Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch" A village on the island of Anglesey (Wales), known to have the longest name in Europe. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/20210314111333.16551-1-daniel.lezcano@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/thermal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 176d9454e8f3..7097d4dcfdd0 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -92,7 +92,7 @@ struct thermal_cooling_device_ops {
struct thermal_cooling_device {
int id;
- char type[THERMAL_NAME_LENGTH];
+ char *type;
struct device device;
struct device_node *np;
void *devdata;