From patchwork Thu Feb 11 23:27:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 12084361 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=-17.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 AD469C433E0 for ; Thu, 11 Feb 2021 23:29:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C00764E42 for ; Thu, 11 Feb 2021 23:29:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C00764E42 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HZrKgXXYq0761A0xKNL+vkdk5weSOoLC8V1X0dWvdlM=; b=HWMD3mm69Zk//ph0kXQ2WtgMC WFrsfKJWrMnaE9Y6FgqvuaIMXYbu0J+EWup2Ekx2QgAJcrY9nO1fyG8Ct9Do3OZHvO4W6s3X2BMxh v9Vrf2WWkrgpvmtVKMFoxwEmQe/DnOK770o+OKj7mksu557cvbTUOVP33npIq+HJ0qJ50KRvsgX74 cxZ79bz8EO3RWqkr+DgQc8TLG6ssNR/0j0vjygm4qtEfn18lL+MXC+o6BbbLCE+imwhsK5P3ZyqEV QJC5GWH7vsmGalM6uaBidXys+BvUnCvYK75aELl0+b8dHwed0sHkleSFnT7aNvWf9b0okijfatNvt KQ//a/JJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALNS-0001rH-1h; Thu, 11 Feb 2021 23:28:02 +0000 Received: from mail-oi1-f176.google.com ([209.85.167.176]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALNK-0001pU-Ha for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 23:27:55 +0000 Received: by mail-oi1-f176.google.com with SMTP id m7so8078026oiw.12 for ; Thu, 11 Feb 2021 15:27:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ADz3YBOZKFLK6zF24DOxVVKS+J+CretpaVJj7vT++ec=; b=EgDbifMpFLQ8BKPyhYev+oOLG5J/vb/J5uvUOIH944RejsdoKD9+vDmBGzvqanpYla PhKnuY+xThU1W6Too2jewtU0+2zL2N3T+MehPnRUJAt08tmIQKtrSBoojEBbVcvTuYiL 1XIbDkPXeaxBQaWyFPUuOnq6ApE7eAHDApx70IFn4ijNiEDkGgqJg/CdGPOFOgWDtzK3 BHbggHB+B8v0KRXKLspWmv5n+SJWenoiccCETT4AFCnoF1VoLqn4q/WdYlZRESzOSZaC WtgnyOBOz7Fa8k4Hp2iqY9pEG/COT02etziLqLC52VYDL/ZdwYjbpXRYCNgyQ2m/131O Nt+w== X-Gm-Message-State: AOAM53300VFRcslZT2RxXZIyv+QsDubgqH3HWbLfLLIyeIrfFkHOqrdm 5nhVrG0PlvEs9SaBXkjncQ== X-Google-Smtp-Source: ABdhPJy+twQqGpwKSav6zIZvsh713BBmGhpUj6WaxgTGWBdNTF041IP+ZozxodSFlnoZb6Znde+AKQ== X-Received: by 2002:aca:eb13:: with SMTP id j19mr185629oih.10.1613086073175; Thu, 11 Feb 2021 15:27:53 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id s18sm1283922oih.53.2021.02.11.15.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 15:27:51 -0800 (PST) From: Rob Herring To: Michael Ellerman , Greg Kroah-Hartman , "David S. Miller" , Jakub Kicinski , Frank Rowand , devicetree@vger.kernel.org Subject: [PATCH v2 2/2] driver core: platform: Drop of_device_node_put() wrapper Date: Thu, 11 Feb 2021 17:27:45 -0600 Message-Id: <20210211232745.1498137-3-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210211232745.1498137-1-robh@kernel.org> References: <20210211232745.1498137-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210211_182754_679276_9005E372 X-CRM114-Status: GOOD ( 18.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Michal Marek , "Rafael J. Wysocki" , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Nicolas Palix , Patrice Chotard , linux-kernel@vger.kernel.org, Julia Lawall , Gilles Muller , Paul Mackerras , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, cocci@systeme.lip6.fr, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org of_device_node_put() is just a wrapper for of_node_put(). The platform driver core is already polluted with of_node pointers and the only 'get' already uses of_node_get() (though typically the get would happen in of_device_alloc()). Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Frank Rowand Signed-off-by: Rob Herring --- v2: - Fix build --- drivers/base/platform.c | 2 +- include/linux/of_device.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 95fd1549f87d..9d5171e5f967 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -571,7 +571,7 @@ static void platform_device_release(struct device *dev) struct platform_object *pa = container_of(dev, struct platform_object, pdev.dev); - of_device_node_put(&pa->pdev.dev); + of_node_put(pa->pdev.dev.of_node); kfree(pa->pdev.dev.platform_data); kfree(pa->pdev.mfd_cell); kfree(pa->pdev.resource); diff --git a/include/linux/of_device.h b/include/linux/of_device.h index d7a407dfeecb..1d7992a02e36 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -38,11 +38,6 @@ extern int of_device_request_module(struct device *dev); extern void of_device_uevent(struct device *dev, struct kobj_uevent_env *env); extern int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env); -static inline void of_device_node_put(struct device *dev) -{ - of_node_put(dev->of_node); -} - static inline struct device_node *of_cpu_device_node_get(int cpu) { struct device *cpu_dev; @@ -94,8 +89,6 @@ static inline int of_device_uevent_modalias(struct device *dev, return -ENODEV; } -static inline void of_device_node_put(struct device *dev) { } - static inline const struct of_device_id *of_match_device( const struct of_device_id *matches, const struct device *dev) {