From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66211C43219 for ; Fri, 3 May 2019 08:04:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 333D42087F for ; Fri, 3 May 2019 08:04:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KOwMT0Cl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726193AbfECIEo (ORCPT ); Fri, 3 May 2019 04:04:44 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39049 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfECIEn (ORCPT ); Fri, 3 May 2019 04:04:43 -0400 Received: by mail-wr1-f65.google.com with SMTP id a9so6610929wrp.6 for ; Fri, 03 May 2019 01:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TpXqJQI7PVBHDytg+IGA8i8m1/XYj0MrND3X98mgWRU=; b=KOwMT0Cl9efaAA08+DXGflf+klv1sSVEHKxtGUL+CBB2gxt07xyd+GyRUCCFVKzsBF vKFUzaTq0/DOqlmb39mbYs9iH9RkOcgL/KAAeaSaMlUscaGj/bjbj+P1qApNVwESdscJ g+1LJrqUlO8vcWihy8sZ39L1L6LS1ajt0o5fzIYYJaQhvca+WfuJGXFbdFR2rcym4b4t zBYkf1Llb/Z3r2f2Mqm8DStMLgaZcHBFBYpuH2Uow5/FZOaBijtEgoGFhaFs2w3Lbcsf fUx7d6Qd9AwY90DycZfziK6toE6kMAjg8Mx+cK1CNVyDwdMXuzYcxD1e3vRmAV6UcGSV 1pBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TpXqJQI7PVBHDytg+IGA8i8m1/XYj0MrND3X98mgWRU=; b=jfin4e4zqI9BWRmlyXkClYk9Yx7cxBDWKi+PFq0q17LDorIB8ifsoM/2yq3ZAiZ3Ye eZ0Br1NvO8EMNZjpfqPb0imx6LPGlx04VQwSJrXMgpnYMWJ795+CoQSw8m9DwcCXHfOH WxXb4gOHQ6qK8SwcSxyycW0dL/K89lfd98nDv5NofnZEmvAa07aK0+oZIY3iMud9cmX2 OS1zh0gOS4S7+AioLiL7eL6qh6QqEjiMI5w5Tw65ioPo/KoL/rmYN2n7Mrd/Nk7LHpE3 y5XZg7FBVw5YvjWzCTQhHEJP5lYcqPMmAYpsyZRBplxx4LzV+heUyvAMmZtX/pR8Sxd3 x6OQ== X-Gm-Message-State: APjAAAWKjnSQMQq1CNPkB/AyqhmUp07hE29ArccnLvDNtApqHCTBC/Lr L1R9fiGZ15FtZ613qIklOnMN4A== X-Google-Smtp-Source: APXvYqzRH5TpkdzGloadzIxAtQZsM2JgxqfDy9oibY2Qrd4ctA1Tpc85qqJ9ZfJamG8tTMt5Vi3YIQ== X-Received: by 2002:a5d:430f:: with SMTP id h15mr5756534wrq.132.1556870681778; Fri, 03 May 2019 01:04:41 -0700 (PDT) Received: from [192.168.0.41] (223.235.129.77.rev.sfr.net. [77.129.235.223]) by smtp.googlemail.com with ESMTPSA id k1sm1159060wmi.48.2019.05.03.01.04.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 01:04:41 -0700 (PDT) Subject: Re: [PATCH 1/6] thermal: Introduce devm_thermal_of_cooling_device_register To: Guenter Roeck , linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-pm@vger.kernel.org Cc: Jean Delvare , Joel Stanley , Andrew Jeffery , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Kamil Debski , Bartlomiej Zolnierkiewicz , Zhang Rui , Eduardo Valentin References: <1555617500-10862-1-git-send-email-linux@roeck-us.net> <1555617500-10862-2-git-send-email-linux@roeck-us.net> <20190501164843.GA16333@roeck-us.net> From: Daniel Lezcano Message-ID: Date: Fri, 3 May 2019 10:04:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190501164843.GA16333@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On 01/05/2019 18:48, Guenter Roeck wrote: > On Thu, Apr 18, 2019 at 12:58:15PM -0700, Guenter Roeck wrote: >> thermal_of_cooling_device_register() and thermal_cooling_device_register() >> are typically called from driver probe functions, and >> thermal_cooling_device_unregister() is called from remove functions. This >> makes both a perfect candidate for device managed functions. >> >> Introduce devm_thermal_of_cooling_device_register(). This function can >> also be used to replace thermal_cooling_device_register() by passing a NULL >> pointer as device node. The new function requires both struct device * >> and struct device_node * as parameters since the struct device_node * >> parameter is not always identical to dev->of_node. >> >> Don't introduce a device managed remove function since it is not needed >> at this point. >> > > Any feedback / thoughts / comments ? Hi Guenter, I have comments about your patch but I need some time to double check in the current code how the 'of' and 'devm' are implemented. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog