{"id":2230358,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230358/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260429161430.3802970-8-daniel.lezcano@oss.qualcomm.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/1.1/projects/21/?format=json","name":"Linux Tegra Development","link_name":"linux-tegra","list_id":"linux-tegra.vger.kernel.org","list_email":"linux-tegra@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20260429161430.3802970-8-daniel.lezcano@oss.qualcomm.com>","date":"2026-04-29T16:14:20","name":"[v3,07/11] thermal/of: Rename the devm_thermal_of_cooling_device_register() function","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"10db9379c2c4e53ab0eb34770ea19e964bb0169e","submitter":{"id":92879,"url":"http://patchwork.ozlabs.org/api/1.1/people/92879/?format=json","name":"Daniel Lezcano","email":"daniel.lezcano@oss.qualcomm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260429161430.3802970-8-daniel.lezcano@oss.qualcomm.com/mbox/","series":[{"id":502106,"url":"http://patchwork.ozlabs.org/api/1.1/series/502106/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=502106","date":"2026-04-29T16:14:20","name":null,"version":3,"mbox":"http://patchwork.ozlabs.org/series/502106/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230358/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230358/checks/","tags":{},"headers":{"Return-Path":"\n <linux-tegra+bounces-14059-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=FvQWoVWE;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=j+BQYLbu;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-tegra+bounces-14059-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"FvQWoVWE\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"j+BQYLbu\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.180.131","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5Mpr1rfwz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 02:15:32 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 7EE0D30072B0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 16:15:01 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A8874402455;\n\tWed, 29 Apr 2026 16:15:00 +0000 (UTC)","from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 08A393FFACC\n\tfor <linux-tegra@vger.kernel.org>; Wed, 29 Apr 2026 16:14:55 +0000 (UTC)","from pps.filterd (m0279869.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63TEqRHB3752527\n\tfor <linux-tegra@vger.kernel.org>; Wed, 29 Apr 2026 16:14:55 GMT","from mail-vk1-f199.google.com (mail-vk1-f199.google.com\n [209.85.221.199])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4duch1jdqt-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-tegra@vger.kernel.org>; Wed, 29 Apr 2026 16:14:54 +0000 (GMT)","by mail-vk1-f199.google.com with SMTP id\n 71dfb90a1353d-56ae34d6738so20615437e0c.3\n        for <linux-tegra@vger.kernel.org>;\n Wed, 29 Apr 2026 09:14:54 -0700 (PDT)","from mai.box.freepro.com ([2a05:6e02:1041:c10:ae20:597c:99b8:d161])\n        by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48a81ed659dsm2438525e9.2.2026.04.29.09.14.51\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 29 Apr 2026 09:14:52 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777479299; cv=none;\n b=aDGXrGb2nsbqMVT38Z9AJobKBwnyhc34VkQUksRCeY3aGStx1tZ7gwMUsJnYkSu1Ya4eUwE4PidKsisWd51Q2dZkWRaCHVe4e1uthvBoWwZnjYIiV9dwwFyL4DLmBHfoUqtsftMukDxwaKmD+Vm11HF74jeSsFjmqEJgMTPNUyU=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777479299; c=relaxed/simple;\n\tbh=nTw8RjWFKITdcvHReTcq1FHnN43/FCA/K0PRTQQ9P6E=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=NDtjzEWux81QD/Wa06xEfjLgquTZneC4AeoHDvjA7YGMBi+NcvoEl/+t8kmlYDajvHUblqu+w/A6WD4oqmkhjG+fr0lIFuIcs0xkuGJzkPEuAZ9aVayHDNs2d5r5gty9wgiMRB7hb8vF0Dca2dNOM+bvBZLbDKT39Eq81vp/BII=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com;\n spf=pass smtp.mailfrom=oss.qualcomm.com;\n dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=FvQWoVWE;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=j+BQYLbu; arc=none smtp.client-ip=205.220.180.131","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=qcppdkim1; bh=5X6EWdy6gq/\n\tTxQgL9gfFBe5KbMSDagX2IixukijnMmo=; b=FvQWoVWEDz2znEo6zPvKxw1Of6i\n\tDWoo+JJ5TZkiMfinl++SZNC3zQLl+mo+AqVxWIxWC0kSgag+FNyvGb5LJouVWHw0\n\tHDA77gl6FjFw4To0KVQjXyfTw+Q0H4PQ0Cr/auVEvSG9unlus4cx4WZWeKEOS0jn\n\t/gQh9IAjRY6O0OZPSzm+iYm8wIyl/Qkk4qWIqxMjRBPMMbCS3od5IXAo+SbFGpKK\n\tVjsFn8nCgr9ni1QGcxUNAAHxvpjYfziwGCoYnpr22XSY3aOpFMxtQPcBM8YiVc0a\n\tdZ5XRI0oyvOGXGgCktxLjo05qGlropswOtU/Vim21Sjm8eLB6QL2dg+HcAQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=oss.qualcomm.com; s=google; t=1777479294; x=1778084094;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=5X6EWdy6gq/TxQgL9gfFBe5KbMSDagX2IixukijnMmo=;\n        b=j+BQYLbu6K3lZO4kj100/fZey3pYDWENgAlv8oLFGiuLbqnNvCqglY4m57E/ghNkay\n         McL6LR4o4o0vAFuWCdsa5VALy4+Q5MwnejN/zydGlPeejh0wP1m8bz8/vUqnq+gPz6hE\n         Lcz9j4vFDAQOrvfs0ftlscApsCQuUqLQvj8FSlFYqBhhbpvrY62S6ePNM+S/uuH+KN/W\n         JET9d4SfzsiKlWcBfQwQH/BBKe0dvUlhkERG6TOM0w4wR3OGUGuHeNlXoSlHoZY+qLmh\n         ZmJasPRn4c9rc7nOQsQpgAGvajJjgBrAVYfxR6eKwvHN2GmkANOZgBhg/we1fBMt5IMs\n         HO6Q=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1777479294; x=1778084094;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=5X6EWdy6gq/TxQgL9gfFBe5KbMSDagX2IixukijnMmo=;\n        b=bQ4GTI1572DJutMj1HowPg4t5C6p6a6lMQ1FnW2HaGTVNFeq/y4mO8yLBwmRyjBGJs\n         Ul0bEGjj8dnZAwq8qWqsnJidikk8ZBDkmNBPSNwtRnXDE1lkzKm6LfvWKuVtKP9GSVj6\n         o0TgmZ1hgh4nWHi1PdK4kpAmDVfAN2QIsoc9jSrpTe/jwXDiQD3iD6MDop/T+L63XP34\n         cpCB23K8qdHh/rlysxlZUjm8lgUQTGvXbGaDvXC8C8gyhKpcx8YcWYkxCAt/cuvpQnFE\n         Y9+mga4dLrUUMWUpOW5pShx94KgRCcGplqErIVYpHFTieDxRo11iPbxHYbAFqFX6Rt2L\n         XrHA==","X-Forwarded-Encrypted":"i=1;\n AFNElJ/3xOl1lIptp6IoDD2TTyRH6uAIxN24bwIJT+c5bgt+VyJ1c1AHINMoKTuwS4ckcrVPaJHCnfsO+FVHcg==@vger.kernel.org","X-Gm-Message-State":"AOJu0Yz1q12Jq5qA7oTKP01C7YFLwCBbu94D4iNcYcDTvAkhVUHzqJ+q\n\tIo+R0Ou2oA4iZ0yVVKHBwjeqIQKiV4IpfKZF3/dq/xeUPfu6uk8TKm1HeGhN449CD7dQCw7THzy\n\t3mLxuwwMTnrm23x7mVWjh7suqcjrvLjzW/cbBhU4a+TQ98qVqQmJjg02e8nEw2ev0OQ==","X-Gm-Gg":"AeBDievjUnEXxPKdLSP6F1DZPUX4UCJeKcmVFKrMe6M86IHJuoojMhHkVprIY/1kBEf\n\tlenWL5E0rb7wyUxSbKU/muXVRinJse8aelppG5SyfjjL+JbWjfnV0FmFRbETrF6EH9YurB2/5Z5\n\tCh98BJpV1xNvF/D6RdZDTm7wY9C3G26gebYDanWh4rHs+JZBIYtXqnFxTI/5Yo41AzyHRQ61PJx\n\tMzHSHKXpBntTvxw9/e8Glu/f6U5PYsvxBqrTllCAueIsQoXM5v1A4KnVS+rOr3sNC139jEcW129\n\tPF8YBZ1cpjhots0zhUzvozdvFyT8/V5t5irAw9B0iPMupbOti3D92qI62llVcQ+1yrg6spoUqRZ\n\t0azVf13lTM0daFf62Q15HLQDnZ5ylaVjvDGlLdIOTQrvzUl5bE3RrKAFfzuLp","X-Received":["by 2002:a05:6122:d91:b0:56b:7023:1393 with SMTP id\n 71dfb90a1353d-573b35fc098mr2556174e0c.11.1777479293889;\n        Wed, 29 Apr 2026 09:14:53 -0700 (PDT)","by 2002:a05:6122:d91:b0:56b:7023:1393 with SMTP id\n 71dfb90a1353d-573b35fc098mr2556050e0c.11.1777479293244;\n        Wed, 29 Apr 2026 09:14:53 -0700 (PDT)"],"From":"Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>","To":"rafael@kernel.org, daniel.lezcano@kernel.org","Cc":"gaurav.kohli@oss.qualcomm.com, Zhang Rui <rui.zhang@intel.com>,\n Lukasz Luba <lukasz.luba@arm.com>, Rob Herring <robh@kernel.org>,\n Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>,\n Lucas Stach <l.stach@pengutronix.de>,\n Russell King <linux+etnaviv@armlinux.org.uk>,\n Christian Gmeiner <christian.gmeiner@gmail.com>,\n David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,\n Guenter Roeck <linux@roeck-us.net>, Joel Stanley <joel@jms.id.au>,\n Andrew Jeffery <andrew@codeconstruct.com.au>, =?utf-8?q?Thomas_Wei=C3=9Fsch?=\n\t=?utf-8?q?uh?= <linux@weissschuh.net>, Benson Leung <bleung@chromium.org>,\n\t=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>,\n Avi Fishman <avifishman70@gmail.com>, Tomer Maimon <tmaimon77@gmail.com>,\n Tali Perry <tali.perry1@gmail.com>, Patrick Venture <venture@google.com>,\n Nancy Yuen <yuenn@google.com>, Benjamin Fair <benjaminfair@google.com>,\n Heiko Stuebner <heiko@sntech.de>, Thierry Reding <thierry.reding@gmail.com>,\n Jonathan Hunter <jonathanh@nvidia.com>,\n Bjorn Andersson <andersson@kernel.org>,\n Konrad Dybcio <konradybcio@kernel.org>,\n Amit Daniel Kachhap <amit.kachhap@gmail.com>,\n Viresh Kumar <viresh.kumar@linaro.org>,\n Neil Armstrong <neil.armstrong@linaro.org>, Amit Kucheria <amitk@kernel.org>,\n linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,\n linux-hwmon@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,\n Nathan Chancellor <nathan@kernel.org>,\n Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,\n Bill Wendling <morbo@google.com>, Justin Stitt <justinstitt@google.com>,\n Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@kernel.org>,\n \"Jiri Slaby (SUSE)\" <jirislaby@kernel.org>,\n Mikko Perttunen <mperttunen@nvidia.com>,\n Svyatoslav Ryhel <clamor95@gmail.com>,\n linux-arm-kernel@lists.infradead.org (moderated list:ARM/ASPEED MACHINE\n SUPPORT),\n linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT),\n openbmc@lists.ozlabs.org (moderated list:ARM/NUVOTON NPCM ARCHITECTURE),\n linux-tegra@vger.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT),\n linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM MAILING LIST),\n linux-amlogic@lists.infradead.org (open list:KHADAS MCU MFD DRIVER),\n llvm@lists.linux.dev (open list:CLANG/LLVM BUILD SUPPORT)","Subject":"[PATCH v3 07/11] thermal/of: Rename the\n devm_thermal_of_cooling_device_register() function","Date":"Wed, 29 Apr 2026 18:14:20 +0200","Message-ID":"<20260429161430.3802970-8-daniel.lezcano@oss.qualcomm.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260429161430.3802970-1-daniel.lezcano@oss.qualcomm.com>","References":"<20260429161430.3802970-1-daniel.lezcano@oss.qualcomm.com>","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Authority-Analysis":"v=2.4 cv=arGCzyZV c=1 sm=1 tr=0 ts=69f22e7e cx=c_pps\n a=+D9SDfe9YZWTjADjLiQY5g==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10\n a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22\n a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=YYchOvpREA9nlnY3_CYA:9\n a=vmgOmaN-Xu0dpDh8OwbV:22","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI5MDE2MiBTYWx0ZWRfX+oTBQyQxTWCn\n 1h0n4GPQVtfDBvFCSgEQY/hndEwppw93M8Q2RMVZq1vV3sskUd6mNqqxo8zO5kd5e2lHY3P9hlB\n uFKSE5pQNRKmgN1WnwIcpNjaWMmYnpljkovSxdc7SAi/4/VwOy74g8kPapOh+h4ouTlAtEiMHT7\n 4izArkQj23C5DNLyj+ywwxAcndDRzd+ROC9ADwLWhE4rzahk0Yw7qVpzSj6nr8f5l1RATFbam2i\n HjGnBogdtcE5yC29hKbC/BbGm9kkI/AGdPmwHmW0lBEUNiW1Zc2VwgD7GZ1ezafjRn8rmZRjedr\n h7sqsX8DXYh7KwdPgxxwGoXrmNWGhzZhW0HcV63Cpkp4mftLLTcPM51Y1KXwZhAqUBaeQehtJDs\n NmLBWHKEUuJ1stJmZM/pPIN6N546f8ma9Mf/7HXxmkba8uXOGRf/6jI7VdDOxvGwadtwsnUI9Id\n nGFkSOCm504/svlTVtQ==","X-Proofpoint-GUID":"35Wjb0Z1ZS0IWZpWWRyYaL2huR1NWIMr","X-Proofpoint-ORIG-GUID":"35Wjb0Z1ZS0IWZpWWRyYaL2huR1NWIMr","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-29_01,2026-04-28_01,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0\n spamscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604290162"},"content":"The cooling devices can be composed with a cooling device controller\nand a set of cooling devices attached to it. Until now, the DT\nbindings were described using a node for the cooling device controller\nand child nodes for all the cooling devices.\n\nRecently, a new set of cooling devices were proposed with the same\nbindings. Those were rejected because DT maintainers do not want this\nformat anymore. In place, a cooling device will be created with an\nid. Whatever its meaning, the thermal OF will bind a thermal zone and\na cooling device by checking the device node pointer + the id are\nmatching the cooling map with the cooling device.\n\nActually this approach is consistent with the thermal which are also\nregistered with a device and an id.\n\nIn order to do a distinction between the old binding with child nodes\nand the incoming new binding, let's rename the registering function\nwith a self-explanatory name.\n\nRename the functions:\n\tdevm_thermal_of_cooling_device_register() -> devm_thermal_of_child_cooling_device_register()\n\nUsed the command:\n\n     \t find . -type f -name '*.[ch]' -exec \\\n\t sed -i 's/devm_thermal_of_cooling_device_register/\\\n\t devm_thermal_of_child_cooling_device_register/g' {} \\;\n\nDid not used clang-format-diff because it does not indent correctly\nand checkpatch complained. Manually reindented to make checkpatch\nhappy\n\nSigned-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>\n---\n drivers/hwmon/amc6821.c                  |  2 +-\n drivers/hwmon/aspeed-pwm-tacho.c         |  5 +++--\n drivers/hwmon/emc2305.c                  |  6 +++---\n drivers/hwmon/gpio-fan.c                 |  6 ++++--\n drivers/hwmon/max6650.c                  |  6 +++---\n drivers/hwmon/npcm750-pwm-fan.c          |  6 ++++--\n drivers/hwmon/pwm-fan.c                  |  5 +++--\n drivers/hwmon/qnap-mcu-hwmon.c           |  6 +++---\n drivers/hwmon/tc654.c                    |  5 +++--\n drivers/memory/tegra/tegra210-emc-core.c |  4 ++--\n drivers/soc/qcom/qcom_aoss.c             |  2 +-\n drivers/thermal/khadas_mcu_fan.c         |  7 ++++---\n drivers/thermal/tegra/soctherm.c         |  6 +++---\n drivers/thermal/thermal_of.c             | 15 +++++++++------\n include/linux/thermal.h                  | 16 ++++++++--------\n 15 files changed, 54 insertions(+), 43 deletions(-)","diff":"diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c\nindex d5f864b360b0..8e5926b06070 100644\n--- a/drivers/hwmon/amc6821.c\n+++ b/drivers/hwmon/amc6821.c\n@@ -1076,7 +1076,7 @@ static int amc6821_probe(struct i2c_client *client)\n \t\t\t\t     \"Failed to initialize hwmon\\n\");\n \n \tif (IS_ENABLED(CONFIG_THERMAL) && fan_np && data->fan_cooling_levels)\n-\t\treturn PTR_ERR_OR_ZERO(devm_thermal_of_cooling_device_register(dev,\n+\t\treturn PTR_ERR_OR_ZERO(devm_thermal_of_child_cooling_device_register(dev,\n \t\t\tfan_np, client->name, data, &amc6821_cooling_ops));\n \n \treturn 0;\ndiff --git a/drivers/hwmon/aspeed-pwm-tacho.c b/drivers/hwmon/aspeed-pwm-tacho.c\nindex aa159bf158a3..1c5945d4ba37 100644\n--- a/drivers/hwmon/aspeed-pwm-tacho.c\n+++ b/drivers/hwmon/aspeed-pwm-tacho.c\n@@ -841,8 +841,9 @@ static int aspeed_create_pwm_cooling(struct device *dev,\n \t}\n \tsnprintf(cdev->name, MAX_CDEV_NAME_LEN, \"%pOFn%d\", child, pwm_port);\n \n-\tcdev->tcdev = devm_thermal_of_cooling_device_register(dev, child,\n-\t\t\t\t\tcdev->name, cdev, &aspeed_pwm_cool_ops);\n+\tcdev->tcdev = devm_thermal_of_child_cooling_device_register(dev, child,\n+\t\t\t\t\t\t\t\t    cdev->name, cdev,\n+\t\t\t\t\t\t\t\t    &aspeed_pwm_cool_ops);\n \tif (IS_ERR(cdev->tcdev))\n \t\treturn PTR_ERR(cdev->tcdev);\n \ndiff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c\nindex 64b213e1451e..2505e9fac499 100644\n--- a/drivers/hwmon/emc2305.c\n+++ b/drivers/hwmon/emc2305.c\n@@ -309,9 +309,9 @@ static int emc2305_set_single_tz(struct device *dev, struct device_node *fan_nod\n \tpwm = data->pwm_min[cdev_idx];\n \n \tdata->cdev_data[cdev_idx].cdev =\n-\t\tdevm_thermal_of_cooling_device_register(dev, fan_node,\n-\t\t\t\t\t\t\temc2305_fan_name[idx], data,\n-\t\t\t\t\t\t\t&emc2305_cooling_ops);\n+\t\tdevm_thermal_of_child_cooling_device_register(dev, fan_node,\n+\t\t\t\t\t\t\t      emc2305_fan_name[idx], data,\n+\t\t\t\t\t\t\t      &emc2305_cooling_ops);\n \n \tif (IS_ERR(data->cdev_data[cdev_idx].cdev)) {\n \t\tdev_err(dev, \"Failed to register cooling device %s\\n\", emc2305_fan_name[idx]);\ndiff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c\nindex a8892ced1e54..084828e1e281 100644\n--- a/drivers/hwmon/gpio-fan.c\n+++ b/drivers/hwmon/gpio-fan.c\n@@ -592,8 +592,10 @@ static int gpio_fan_probe(struct platform_device *pdev)\n \t}\n \n \t/* Optional cooling device register for Device tree platforms */\n-\tfan_data->cdev = devm_thermal_of_cooling_device_register(dev, np,\n-\t\t\t\t\"gpio-fan\", fan_data, &gpio_fan_cool_ops);\n+\tfan_data->cdev = devm_thermal_of_child_cooling_device_register(dev, np,\n+\t\t\t\t\t\t\t\t       \"gpio-fan\",\n+\t\t\t\t\t\t\t\t       fan_data,\n+\t\t\t\t\t\t\t\t       &gpio_fan_cool_ops);\n \n \tdev_info(dev, \"GPIO fan initialized\\n\");\n \ndiff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c\nindex 9649c6611d5f..a50b1b0f1f48 100644\n--- a/drivers/hwmon/max6650.c\n+++ b/drivers/hwmon/max6650.c\n@@ -793,9 +793,9 @@ static int max6650_probe(struct i2c_client *client)\n \t\treturn err;\n \n \tif (IS_ENABLED(CONFIG_THERMAL)) {\n-\t\tcooling_dev = devm_thermal_of_cooling_device_register(dev,\n-\t\t\t\t\t\tdev->of_node, client->name,\n-\t\t\t\t\t\tdata, &max6650_cooling_ops);\n+\t\tcooling_dev = devm_thermal_of_child_cooling_device_register(dev, dev->of_node,\n+\t\t\t\t\t\t\t\t\t    client->name, data,\n+\t\t\t\t\t\t\t\t\t    &max6650_cooling_ops);\n \t\tif (IS_ERR(cooling_dev)) {\n \t\t\tdev_warn(dev, \"thermal cooling device register failed: %ld\\n\",\n \t\t\t\t PTR_ERR(cooling_dev));\ndiff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c\nindex c8f5e695fb6d..aea0b8659f5f 100644\n--- a/drivers/hwmon/npcm750-pwm-fan.c\n+++ b/drivers/hwmon/npcm750-pwm-fan.c\n@@ -857,8 +857,10 @@ static int npcm7xx_create_pwm_cooling(struct device *dev,\n \tsnprintf(cdev->name, THERMAL_NAME_LENGTH, \"%pOFn%d\", child,\n \t\t pwm_port);\n \n-\tcdev->tcdev = devm_thermal_of_cooling_device_register(dev, child,\n-\t\t\t\tcdev->name, cdev, &npcm7xx_pwm_cool_ops);\n+\tcdev->tcdev = devm_thermal_of_child_cooling_device_register(dev, child,\n+\t\t\t\t\t\t\t\t    cdev->name,\n+\t\t\t\t\t\t\t\t    cdev,\n+\t\t\t\t\t\t\t\t    &npcm7xx_pwm_cool_ops);\n \tif (IS_ERR(cdev->tcdev))\n \t\treturn PTR_ERR(cdev->tcdev);\n \ndiff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c\nindex 37269db2de84..e6a567d58579 100644\n--- a/drivers/hwmon/pwm-fan.c\n+++ b/drivers/hwmon/pwm-fan.c\n@@ -685,8 +685,9 @@ static int pwm_fan_probe(struct platform_device *pdev)\n \n \tctx->pwm_fan_state = ctx->pwm_fan_max_state;\n \tif (IS_ENABLED(CONFIG_THERMAL)) {\n-\t\tcdev = devm_thermal_of_cooling_device_register(dev,\n-\t\t\tdev->of_node, \"pwm-fan\", ctx, &pwm_fan_cooling_ops);\n+\t\tcdev = devm_thermal_of_child_cooling_device_register(dev, dev->of_node,\n+\t\t\t\t\t\t\t\t     \"pwm-fan\", ctx,\n+\t\t\t\t\t\t\t\t     &pwm_fan_cooling_ops);\n \t\tif (IS_ERR(cdev)) {\n \t\t\tret = PTR_ERR(cdev);\n \t\t\tdev_err(dev,\ndiff --git a/drivers/hwmon/qnap-mcu-hwmon.c b/drivers/hwmon/qnap-mcu-hwmon.c\nindex e86e64c4d391..c1c1e9d6f340 100644\n--- a/drivers/hwmon/qnap-mcu-hwmon.c\n+++ b/drivers/hwmon/qnap-mcu-hwmon.c\n@@ -337,9 +337,9 @@ static int qnap_mcu_hwmon_probe(struct platform_device *pdev)\n \t * levels and only succeed with either no or correct cooling levels.\n \t */\n \tif (IS_ENABLED(CONFIG_THERMAL) && hwm->fan_cooling_levels) {\n-\t\tcdev = devm_thermal_of_cooling_device_register(dev,\n-\t\t\t\t\tto_of_node(hwm->fan_node), \"qnap-mcu-hwmon\",\n-\t\t\t\t\thwm, &qnap_mcu_hwmon_cooling_ops);\n+\t\tcdev = devm_thermal_of_child_cooling_device_register(dev, to_of_node(hwm->fan_node),\n+\t\t\t\t\t\t\t\t     \"qnap-mcu-hwmon\", hwm,\n+\t\t\t\t\t\t\t\t     &qnap_mcu_hwmon_cooling_ops);\n \t\tif (IS_ERR(cdev))\n \t\t\treturn dev_err_probe(dev, PTR_ERR(cdev),\n \t\t\t\t\"Failed to register qnap-mcu-hwmon as cooling device\\n\");\ndiff --git a/drivers/hwmon/tc654.c b/drivers/hwmon/tc654.c\nindex 39fe5836f237..ba18b442b81e 100644\n--- a/drivers/hwmon/tc654.c\n+++ b/drivers/hwmon/tc654.c\n@@ -541,8 +541,9 @@ static int tc654_probe(struct i2c_client *client)\n \tif (IS_ENABLED(CONFIG_THERMAL)) {\n \t\tstruct thermal_cooling_device *cdev;\n \n-\t\tcdev = devm_thermal_of_cooling_device_register(dev, dev->of_node, client->name,\n-\t\t\t\t\t\t\t       hwmon_dev, &tc654_fan_cool_ops);\n+\t\tcdev = devm_thermal_of_child_cooling_device_register(dev, dev->of_node,\n+\t\t\t\t\t\t\t\t     client->name, hwmon_dev,\n+\t\t\t\t\t\t\t\t     &tc654_fan_cool_ops);\n \t\treturn PTR_ERR_OR_ZERO(cdev);\n \t}\n \ndiff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c\nindex e96ca4157d48..065ae8bc2830 100644\n--- a/drivers/memory/tegra/tegra210-emc-core.c\n+++ b/drivers/memory/tegra/tegra210-emc-core.c\n@@ -1966,8 +1966,8 @@ static int tegra210_emc_probe(struct platform_device *pdev)\n \n \ttegra210_emc_debugfs_init(emc);\n \n-\tcd = devm_thermal_of_cooling_device_register(emc->dev, np, \"emc\", emc,\n-\t\t\t\t\t\t     &tegra210_emc_cd_ops);\n+\tcd = devm_thermal_of_child_cooling_device_register(emc->dev, np, \"emc\", emc,\n+\t\t\t\t\t\t\t   &tegra210_emc_cd_ops);\n \tif (IS_ERR(cd)) {\n \t\terr = PTR_ERR(cd);\n \t\tdev_err(emc->dev, \"failed to register cooling device: %d\\n\",\ndiff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c\nindex a543ab9bee6c..742f571200fa 100644\n--- a/drivers/soc/qcom/qcom_aoss.c\n+++ b/drivers/soc/qcom/qcom_aoss.c\n@@ -381,7 +381,7 @@ static int qmp_cooling_device_add(struct qmp *qmp,\n \tqmp_cdev->qmp = qmp;\n \tqmp_cdev->state = !qmp_cdev_max_state;\n \tqmp_cdev->name = cdev_name;\n-\tqmp_cdev->cdev = devm_thermal_of_cooling_device_register\n+\tqmp_cdev->cdev = devm_thermal_of_child_cooling_device_register\n \t\t\t\t(qmp->dev, node,\n \t\t\t\tcdev_name,\n \t\t\t\tqmp_cdev, &qmp_cooling_device_ops);\ndiff --git a/drivers/thermal/khadas_mcu_fan.c b/drivers/thermal/khadas_mcu_fan.c\nindex d35e5313bea4..21b3d0a71bd0 100644\n--- a/drivers/thermal/khadas_mcu_fan.c\n+++ b/drivers/thermal/khadas_mcu_fan.c\n@@ -90,9 +90,10 @@ static int khadas_mcu_fan_probe(struct platform_device *pdev)\n \tctx->mcu = mcu;\n \tplatform_set_drvdata(pdev, ctx);\n \n-\tcdev = devm_thermal_of_cooling_device_register(dev->parent,\n-\t\t\tdev->parent->of_node, \"khadas-mcu-fan\", ctx,\n-\t\t\t&khadas_mcu_fan_cooling_ops);\n+\tcdev = devm_thermal_of_child_cooling_device_register(dev->parent,\n+\t\t\t\t\t\t\t     dev->parent->of_node,\n+\t\t\t\t\t\t\t     \"khadas-mcu-fan\", ctx,\n+\t\t\t\t\t\t\t     &khadas_mcu_fan_cooling_ops);\n \tif (IS_ERR(cdev)) {\n \t\tret = PTR_ERR(cdev);\n \t\tdev_err(dev, \"Failed to register khadas-mcu-fan as cooling device: %d\\n\",\ndiff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c\nindex 6a56638c98f1..d8e988a0d43e 100644\n--- a/drivers/thermal/tegra/soctherm.c\n+++ b/drivers/thermal/tegra/soctherm.c\n@@ -1707,9 +1707,9 @@ static void soctherm_init_hw_throt_cdev(struct platform_device *pdev)\n \t\t\tstc->init = true;\n \t\t} else {\n \n-\t\t\ttcd = devm_thermal_of_cooling_device_register(dev, np_stcc,\n-\t\t\t\t\t\t\t\t      (char *)name, ts,\n-\t\t\t\t\t\t\t\t      &throt_cooling_ops);\n+\t\t\ttcd = devm_thermal_of_child_cooling_device_register(dev, np_stcc,\n+\t\t\t\t\t\t\t\t\t    (char *)name, ts,\n+\t\t\t\t\t\t\t\t\t    &throt_cooling_ops);\n \t\t\tif (IS_ERR_OR_NULL(tcd)) {\n \t\t\t\tdev_err(dev,\n \t\t\t\t\t\"throttle-cfg: %s: failed to register cooling device\\n\",\ndiff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c\nindex ba6f246ddef0..cf60ac64db54 100644\n--- a/drivers/thermal/thermal_of.c\n+++ b/drivers/thermal/thermal_of.c\n@@ -557,7 +557,7 @@ static void thermal_of_cooling_device_release(void *data)\n }\n \n /**\n- * devm_thermal_of_cooling_device_register() - register an OF thermal cooling\n+ * devm_thermal_of_child_cooling_device_register() - register an OF thermal cooling\n  *\t\t\t\t\t       device\n  * @dev:\ta valid struct device pointer of a sensor device.\n  * @np:\t\ta pointer to a device tree node.\n@@ -570,14 +570,17 @@ static void thermal_of_cooling_device_release(void *data)\n  * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself\n  * to all the thermal zone devices registered at the same time.\n  *\n+ * This function should be used when a cooling controller has child\n+ * nodes which are referenced in the thermal zone cooling map.\n+ *\n  * Return: a pointer to the created struct thermal_cooling_device or an\n  * ERR_PTR. Caller must check return value with IS_ERR*() helpers.\n  */\n struct thermal_cooling_device *\n-devm_thermal_of_cooling_device_register(struct device *dev,\n-\t\t\t\t\tstruct device_node *np,\n-\t\t\t\t\tconst char *type, void *devdata,\n-\t\t\t\t\tconst struct thermal_cooling_device_ops *ops)\n+devm_thermal_of_child_cooling_device_register(struct device *dev,\n+\t\t\t\t\t      struct device_node *np,\n+\t\t\t\t\t      const char *type, void *devdata,\n+\t\t\t\t\t      const struct thermal_cooling_device_ops *ops)\n {\n \tstruct thermal_cooling_device *cdev;\n \tint ret;\n@@ -592,4 +595,4 @@ devm_thermal_of_cooling_device_register(struct device *dev,\n \n \treturn cdev;\n }\n-EXPORT_SYMBOL_GPL(devm_thermal_of_cooling_device_register);\n+EXPORT_SYMBOL_GPL(devm_thermal_of_child_cooling_device_register);\ndiff --git a/include/linux/thermal.h b/include/linux/thermal.h\nindex f207ca6b63ae..e39bec84b2b6 100644\n--- a/include/linux/thermal.h\n+++ b/include/linux/thermal.h\n@@ -205,10 +205,10 @@ thermal_of_cooling_device_register(struct device_node *np, const char *type, voi\n \t\t\t\t   const struct thermal_cooling_device_ops *ops);\n \n struct thermal_cooling_device *\n-devm_thermal_of_cooling_device_register(struct device *dev,\n-\t\t\t\t\tstruct device_node *np,\n-\t\t\t\t\tconst char *type, void *devdata,\n-\t\t\t\t\tconst struct thermal_cooling_device_ops *ops);\n+devm_thermal_of_child_cooling_device_register(struct device *dev,\n+\t\t\t\t\t      struct device_node *np,\n+\t\t\t\t\t      const char *type, void *devdata,\n+\t\t\t\t\t      const struct thermal_cooling_device_ops *ops);\n #else\n \n static inline\n@@ -232,10 +232,10 @@ thermal_of_cooling_device_register(struct device_node *np,\n }\n \n static inline struct thermal_cooling_device *\n-devm_thermal_of_cooling_device_register(struct device *dev,\n-\t\t\t\t\tstruct device_node *np,\n-\t\t\t\t\tconst char *type, void *devdata,\n-\t\t\t\t\tconst struct thermal_cooling_device_ops *ops)\n+devm_thermal_of_child_cooling_device_register(struct device *dev,\n+\t\t\t\t\t      struct device_node *np,\n+\t\t\t\t\t      const char *type, void *devdata,\n+\t\t\t\t\t      const struct thermal_cooling_device_ops *ops)\n {\n \treturn ERR_PTR(-ENODEV);\n }\n","prefixes":["v3","07/11"]}