Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6314703yba; Wed, 1 May 2019 09:49:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSDY0mW/270o6I4xqrua6wZ6sNWZgCHca4k/FfWnLT5b8aBUMfuexDdqdFVbteYZuJs5QU X-Received: by 2002:a63:e956:: with SMTP id q22mr56078336pgj.277.1556729392371; Wed, 01 May 2019 09:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556729392; cv=none; d=google.com; s=arc-20160816; b=dZVwJN5E0icQ8sgDvAIQPKHeCY3z1JPVFYzfjiCLHVLtDKGpNRLNsp6BWaUGMhDiTE WJpE14fpxOdooic2RvoHR7/XOqiYLoaHKHpWUkJks0n69LMUWgHbRtps4+Y4aHbRqJ47 7LmcvauAAAk3OPsP0jCISaUoN4WM2kxXA8l6Fe7XF/z9xv1rGTCaejnlrCMYsbcNJ6ck ql+D1XYYpKctPVivho+Qx3+p7NGnc09XO5Yozsbw13GH0YkGhg+TqDQ66xaDxXKCgRDO qwpF8OAjiJ0cxpzwFlHRa98t/KgDwoP2cD5WW4B+4KVdN+IAYZt34TZS7ZWMZo2DI3O/ Su6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a82ckZo73SGxA8ey3aK0omtfrwDTACIRQAmbz4zxBz8=; b=nu6AV3Ew2k+ZqXGqXyIxTEs6eO4vbxOhW8ReH1pnh/UhfCb7Mkh4/7X0einrIfu8cK dWVNLAIeab/sxz3b0f9kUbQvikq4DyGHEK2yNpMHgsF0CX4mghuVlJtbVrJaGOI0l4qi /mraQu7dpzwc3XEb8ofbxU5yaM1l8lc85somfpRqH/P7v8zu0APH9MoSSTnPxWg4V23z z+Y9sOh2ej9pz1H7c9RzZBC3E8A3p6oveDnq0i+VsvvLdXnW3gayz81EHig1Nr0/5sJ+ axNFg7TGzDxCmggNbn/hpU2pD41iCtQohkVdnOVL9XzXdBaWYpsRU5M6y/tSIaRawmcJ eKow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DZAZlVyv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f127si42678279pfc.176.2019.05.01.09.49.36; Wed, 01 May 2019 09:49:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DZAZlVyv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbfEAQsq (ORCPT + 99 others); Wed, 1 May 2019 12:48:46 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34192 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbfEAQsq (ORCPT ); Wed, 1 May 2019 12:48:46 -0400 Received: by mail-pl1-f196.google.com with SMTP id ck18so4129847plb.1; Wed, 01 May 2019 09:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=a82ckZo73SGxA8ey3aK0omtfrwDTACIRQAmbz4zxBz8=; b=DZAZlVyv2Zj8QW2ZVaA4F2WxBgm+TYZTAM4t/5EOeChgCJ7BD4Ft2Dzmnf3x6+ydz1 XakRftqblAOckP3MeN3ccDznp09ppAFe871YQDxI1Qj+FuNPuoY1ouHhz5kI+3ZQ3PV3 /L68VP9/OZfwUxqTI2ADGPFduqoKJR0cQ/ilRG4LirfK9AWJ1nlO4sVAtoc4jAZjVELX dwxVevKkDwYvFLwv52/XqZAeyBzWSZ5CO4uvi+nyaZGWjFQjY/27kRLDK4iQOVPv1bS3 pYU7oLCM3TjBP/5voYoXBOCWgkWx+/gNSfwEsWL5ioDvofaSRT3AzcJ5BrlWCeZEJ+vp 9TMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=a82ckZo73SGxA8ey3aK0omtfrwDTACIRQAmbz4zxBz8=; b=eRcacc6vuWJ2IS6LXieJP2nV+JdPyK0DzVyTLlpNteUKuYtVLTDB0NNWxFxVMRyLjb jkZpXMqpSxzbj/mmdgDewI9SRm1gkEWnpkRbVCAuVNixmsOJD70pwuK0LPi2FHOaaSmm hFibVoZeRDX1/wyManUZduKYreqenLrLAx/hOuOoKAwJdqC+MnjYFlK3Xikj96r/q1p/ toFtIaV03CFd2ihqtn34U663ftD5jqWyHE2G3acj5LIQJTYHsElQFPf5CMjs9aVke1Zo d/piFGUMZ2ufbdSBy3Nt++szGHwQwzqUvoPiyhi/KOEjj1piT95aSD9cmKqJyTOYfdjG EEow== X-Gm-Message-State: APjAAAVOZsxdWBX/W9WK/VXby8JYo+/mV9bMdXGB6vtluQfByrpjuZj9 HWcbFDc5i4j7omHFxG3mH5nBogrN X-Received: by 2002:a17:902:163:: with SMTP id 90mr79079707plb.34.1556729325186; Wed, 01 May 2019 09:48:45 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id r76sm62426017pfa.39.2019.05.01.09.48.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 09:48:44 -0700 (PDT) Date: Wed, 1 May 2019 09:48:43 -0700 From: Guenter Roeck To: 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 , Daniel Lezcano Subject: Re: [PATCH 1/6] thermal: Introduce devm_thermal_of_cooling_device_register Message-ID: <20190501164843.GA16333@roeck-us.net> References: <1555617500-10862-1-git-send-email-linux@roeck-us.net> <1555617500-10862-2-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555617500-10862-2-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Thanks, Guenter