get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2226643/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2226643,
    "url": "http://patchwork.ozlabs.org/api/patches/2226643/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260422174305.2899095-9-daniel.lezcano@oss.qualcomm.com/",
    "project": {
        "id": 21,
        "url": "http://patchwork.ozlabs.org/api/projects/21/?format=api",
        "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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260422174305.2899095-9-daniel.lezcano@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-04-22T17:42:57",
    "name": "[v2,08/12] thermal/of: Rename the devm_thermal_of_cooling_device_register() function",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2a12af7c3098d8f3f797bdb30e1d653d258145b6",
    "submitter": {
        "id": 92879,
        "url": "http://patchwork.ozlabs.org/api/people/92879/?format=api",
        "name": "Daniel Lezcano",
        "email": "daniel.lezcano@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260422174305.2899095-9-daniel.lezcano@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 501054,
            "url": "http://patchwork.ozlabs.org/api/series/501054/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=501054",
            "date": "2026-04-22T17:42:50",
            "name": "[v2,01/12] thermal/driver/tegra/soctherm: Use devm_ variant when registering a cooling device",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501054/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226643/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226643/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-tegra+bounces-13850-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=WCLqvnQh;\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=hfPpp15u;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13850-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=\"WCLqvnQh\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"hfPpp15u\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.168.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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4g167k1qB4z1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 03:45:22 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 1FC2B308268C\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 17:43:40 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E3D8439151A;\n\tWed, 22 Apr 2026 17:43:39 +0000 (UTC)",
            "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.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 E5D76396B76\n\tfor <linux-tegra@vger.kernel.org>; Wed, 22 Apr 2026 17:43:37 +0000 (UTC)",
            "from pps.filterd (m0279863.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63MG3epS1230138\n\tfor <linux-tegra@vger.kernel.org>; Wed, 22 Apr 2026 17:43:37 GMT",
            "from mail-qt1-f197.google.com (mail-qt1-f197.google.com\n [209.85.160.197])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1h68bty-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-tegra@vger.kernel.org>; Wed, 22 Apr 2026 17:43:37 +0000 (GMT)",
            "by mail-qt1-f197.google.com with SMTP id\n d75a77b69052e-50faf1ecd1dso63517771cf.1\n        for <linux-tegra@vger.kernel.org>;\n Wed, 22 Apr 2026 10:43:37 -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-488fb7a051dsm142511965e9.18.2026.04.22.10.43.32\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 22 Apr 2026 10:43:34 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776879819; cv=none;\n b=W0J+bO9G8hm7gkH7ns3G5FLk8EkhzhuhkHKI+MRSMaTjHLvPcIgzz1vY0m87rG3yfWgkNme4Zl3JWsFj2SLkpPtV4kKBj58HE2tGfDYihGJWfcDc0yncbeRdYP9Cd91ZVHtUT/u10WkPVh8a63BTgIPBuKgcgpIan9XVYgR6aGk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776879819; c=relaxed/simple;\n\tbh=Lv5Xg8BU5v+PbSSXolZEv2wfgJvRzEAFDtwyaMs8Mas=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=RZy6MUKRr2um3uhT5yFfuvoibEIezhm8IZI3DM+3TIqDCC9eXpomf/eFkrETerHH+VRYqFl9tNgN2we4UzNVMe0rjoBvLwCkEUiNBVOsbzz8KFZcGhz2dUn80oXrs28zF4gPARUoTcUG4luVKhYzdt+KRu+He+RS5nHV8Nv3gg4=",
        "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=WCLqvnQh;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=hfPpp15u; arc=none smtp.client-ip=205.220.168.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=9NaipcfK+U5\n\tvCs+9GzkqYBawAZE4g4xw2/lsPt8l0yA=; b=WCLqvnQhHRE/A3ymgh9SwvoGTwp\n\t9Rp6TJoWSyOfKbLHy1QF+3nV0knEePgih8rSzbWDN68N9US4k9VYStrVtxrSS7m8\n\tIr3pi7T30enBmiBOAvFnBHADhT1ptyOkFJjoi5tlpgTewM+CclM7j9isSWOjju9L\n\tmPyhlbQh1j8Tql3ButuxulyqjOMVHCmg+SrIMCWkVhvN9esGPFRIuhzqSRqjfbEi\n\tAtYOA+T3e+Uved5YIdcdLj0l9wFoiCybauJjT8Je4eI94c2W5GtfM+0ZT02mYrSB\n\t2zcZAn9PhYcCmHz3/vwL6pBJ4e0mkIzzCv7QKi8nwP+5nIF111u3WoTgHNQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=oss.qualcomm.com; s=google; t=1776879816; x=1777484616;\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=9NaipcfK+U5vCs+9GzkqYBawAZE4g4xw2/lsPt8l0yA=;\n        b=hfPpp15ufZQbIWB3x46fVqEBqmoJdjxg9n+1ckfu2rXQjQtONf8fNKcBoVOUDv0pBg\n         Pp7zdVlXNAg8tof9v8KT2rME9rBbxTcH4wWqMD14YsTAS4H1Ns64dfZNz3OIxTOqRHkb\n         g3dQ9pXq1n1jZFzg+Ou/JmO2iZWrNExQ2cEkuOmYRR0bwqu1pCPflv0/HFPdd+w6JYl+\n         z4OM4T3nnCeiaOlza75YYZTNWsaTaRwjIZDJsiCURelqfllMLm3jsHu0u75KygQxe7ax\n         RzjV4hZO7rldvhdv8O9pEqOPnX+AaMUF0G1HZNr1UgSJEkfHfqMns0VaDa8NNlsMLYoE\n         NdMQ=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776879816; x=1777484616;\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=9NaipcfK+U5vCs+9GzkqYBawAZE4g4xw2/lsPt8l0yA=;\n        b=XxZN4LmHGKunZhqviD65/IoS3pkFcM6nAzZ178T6mnKVr9fRAhdr0YsLlU0iD3J/O9\n         ydvY0CCGki1lD0gTZHK7zPNTiWDG4kD+sYwMwaxr+MwqEzzksOad+tc3nRU5giKg2jVS\n         XCvlyfyyyFI5BqqauAM7HtBmweFLrVAQUCOHF2PeTPsrifTudvJDkCGf88PCeR23/bGh\n         J4ZFFPcLuCMQy5PLUyPkWmTiVSnRF4ujmrD2AXtTdSQ2Q8PtCEpQr0t8rebxwdjaR5JN\n         RYOmcZFzQv4mG8ToalOgUk6ogs2Tg7K56fBTrqHgoi8AUGqLkNKMjAcjy2lMcjDM+DbY\n         4k8Q==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ8jPfQ58x2fc24RKTAxfERnl2LlDDEzeoiKh7En/8YKJXherSOemJZzprq6nkC6tig6Wuj5OKNpq7p4jA==@vger.kernel.org",
        "X-Gm-Message-State": "AOJu0YzusaUURXMusHWjKsTwSY5HAT8SkqFLjSRKm5Mai/18FkTiWrNK\n\tbItHd9UDHpmndDG5p8d8sGkNdq4irGjuRmu88lptVcw7YhFEn8QnSeVMkrgmnymcLNAu2j01/dt\n\tH9vvtG9HzCqBbcaxQUndTKwIO0P4t9yBacI03lmrrp3VCu6hZZKAMQcQa7eMt4/hxJA==",
        "X-Gm-Gg": "AeBDiet579rneQ57JfrfbUDwBIpEI1l8ZF5cyEGvcHmGyypGhrOQ3Ipp2gvSWt0nA5h\n\tskfRCBVcBcQXWWui4vWxNFKsN5c78ZN7uLDWzm2oLxsS2VDWFhvIpHe+S8vjaqEiRsgvLwbNQGu\n\tDJkkd7uDuP6xfgUSKDsHJNs6WzNWh2ITuCGkng9lPB8gZX8b0Qj0MyvplNlZnB/TJ42mNVd4wQt\n\tJs6w9sZqFr+OW8irB4lByKJ5F9HqPKHVhW09dbXBzLfLJdraQDCW5v7I2GLmE2ESeLpo8VKhd+B\n\t4jmIYPtHiyfjkYjtT4mbxksUCFgiKxekQvSD11extkZKKueVHhMT4at5IPOI6w9gXz4ZfrLrocm\n\tO/JpmYfEuHUiWE/rfRVbdTpSJKC5ZkuMtIFLkZ7IHe9Dy5iYvdS7evLnIGWEE",
        "X-Received": [
            "by 2002:ac8:7dc5:0:b0:50e:6054:ba with SMTP id\n d75a77b69052e-50e60540c69mr173172291cf.9.1776879815999;\n        Wed, 22 Apr 2026 10:43:35 -0700 (PDT)",
            "by 2002:ac8:7dc5:0:b0:50e:6054:ba with SMTP id\n d75a77b69052e-50e60540c69mr173171461cf.9.1776879815403;\n        Wed, 22 Apr 2026 10:43:35 -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 Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@kernel.org>,\n \"Jiri Slaby (SUSE)\" <jirislaby@kernel.org>,\n Svyatoslav Ryhel <clamor95@gmail.com>,\n Mikko Perttunen <mperttunen@nvidia.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 v2 08/12] thermal/of: Rename the\n devm_thermal_of_cooling_device_register() function",
        "Date": "Wed, 22 Apr 2026 19:42:57 +0200",
        "Message-ID": "<20260422174305.2899095-9-daniel.lezcano@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260422174305.2899095-1-daniel.lezcano@oss.qualcomm.com>",
        "References": "<20260422174305.2899095-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=f4Z4wuyM c=1 sm=1 tr=0 ts=69e908c9 cx=c_pps\n a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10\n a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22\n a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=YYchOvpREA9nlnY3_CYA:9\n a=a_PwQJl-kcHnX1M80qC6:22",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDIyMDE3MSBTYWx0ZWRfX3t18VLxKP1Nq\n 9YJk4Kops37Sc6l+AIl4kbReVu6mGDP7Jq2pwW6sYDFipNr8Vpz6zchxCKCtCiby9ijw5+EmkJX\n BZ07PsZ2mzFyX60ugDmchFl227OtfRvge5X05+kJqwpj/dki5UMxAvdo7NTFv2PWfVdRaUDwSJl\n PkYhVXeIM8xjpcEdpKyyRw4/tUgiwVejJyCIx16sGmC5hAuzMSSoSIC6y0FZlXJQKe0v2RrZBms\n McTBUCj8MpRw+VXc+bkmV+/li8fahgPj1RotAGm04Sfkgw011ysq2mevMf9mvBAScPAEKO9tKxS\n lt68jwV8syXlpil1gWqUiYIzL5bzZ0fHICR+WCbDP2Wx5y2g9Ov2goBKYH0YN4aE5/tnkq6YHdY\n x4BwInGY1MTQ7GGUzZRixNWTK66r9IY/QZ9EdCBZS2D9FODV4wKFNKI39kTCxbgwY+ODFAcGLE8\n 92lbX9XAzC1o9alXGHQ==",
        "X-Proofpoint-GUID": "4trWTWi2EdhTjW49mvOZrZjul_QPrCRz",
        "X-Proofpoint-ORIG-GUID": "4trWTWi2EdhTjW49mvOZrZjul_QPrCRz",
        "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-22_02,2026-04-21_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n impostorscore=0 phishscore=0 bulkscore=0 malwarescore=0 clxscore=1015\n spamscore=0 suspectscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604220171"
    },
    "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 790c4c96a9b5..f58430ed8f11 100644\n--- a/drivers/thermal/tegra/soctherm.c\n+++ b/drivers/thermal/tegra/soctherm.c\n@@ -1700,9 +1700,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 ee9776d0e5be..d06487bb5e67 100644\n--- a/drivers/thermal/thermal_of.c\n+++ b/drivers/thermal/thermal_of.c\n@@ -550,7 +550,7 @@ static void thermal_cooling_device_release(struct device *dev, void *res)\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@@ -563,14 +563,17 @@ static void thermal_cooling_device_release(struct device *dev, void *res)\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 **ptr, *tcd;\n \n@@ -592,4 +595,4 @@ devm_thermal_of_cooling_device_register(struct device *dev,\n \n \treturn tcd;\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 0a95cfeffa74..b3c448f7d919 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": [
        "v2",
        "08/12"
    ]
}