From patchwork Thu Feb 11 22:25:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 12084257 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 DD769C433E6 for ; Thu, 11 Feb 2021 22:26:46 +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 9CA4B64E38 for ; Thu, 11 Feb 2021 22:26:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CA4B64E38 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=q1LkTnm3pfyzrc3ZGDrSwYFNzujHor+7dY/99SIvMTc=; b=ExOPROSs5Sot4Jfq9WhXu1RjV XIiZTu/xbUUMeNE6qoms1gI/KZXiArXjpV3XQfUFHZqkvEhmiDnonLv3sWlOfCREoXBNqlifz+Pje YDsnjRctwCkpqtQZCdf6hic05GVizHWQ3iUbCnFwEK4s774LiNsM5vp/F/8dFsMiE/JSdxKAPNz4k +FnL6xPY+hrzkf8Wkwbo/xbzd5avpf1iefL88HH3zJ5/0PaKFwdM04RN8zO9q1epEPTwkWGIMC9NO kd4xnIUEnPPXgPi/a6EswxWEJ7kxLP1qsoqtmiMtUzy3+AKSpibUNsudKZn3uKPdH7sqcaA8zOGJe xaMZyhM7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAKP3-0004v1-He; Thu, 11 Feb 2021 22:25:37 +0000 Received: from mail-ot1-f43.google.com ([209.85.210.43]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAKOz-0004tl-MW for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 22:25:34 +0000 Received: by mail-ot1-f43.google.com with SMTP id c16so6726221otp.0 for ; Thu, 11 Feb 2021 14:25:31 -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=NLvw9f5cSXlPho1shNG7Jdg19r2wGEA2nCu/eGns0Js=; b=UrxnXpWQQ2eTuWQpU7ykaMNGL5yFAR8eGPWh5DGYyuphw8Heh7cHKT/AZNOIYuTDnR xWCbTBt/z67IwFDGd4cca8EOMteM1aEuSmvi4ccvcw/zGTvxTZbC1rnqXbjRcs7cfV9D Yoyjlix7XhFRK3vfAnTsMOwVI5xFEeEF+XkM+t/XONsX/meN1+/vDCSAeWMVXuQ7oE0o OiMR0IHVAyiFJbIefWjmPgN/gqUhrgnw+KuE7xo/1jw+iYssI75p17L11S1jOX91suip QWfTRtO6M7annzAQd8a/+9fZ94tNtXx3LK9rLPqNPQVjz9I8aUh3/+TVsM3Z6D30Yj7O 45lw== X-Gm-Message-State: AOAM532iJahqbaQapHAraMMxewtQOlabLHXgCypPqQKcbjyWVNADYXmD LO3RK/9+ZO2ChGwi7S/AFA== X-Google-Smtp-Source: ABdhPJyQGFVfAP7PXxKkza/IfsEKHXTE/7yuVrEhheTI5TULfoj3OVppCi9bnJLCVmoT3f6DX3uh6g== X-Received: by 2002:a9d:6b10:: with SMTP id g16mr166243otp.154.1613082331122; Thu, 11 Feb 2021 14:25:31 -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 j25sm978030otn.55.2021.02.11.14.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 14:25:30 -0800 (PST) From: Rob Herring To: Michael Ellerman , Greg Kroah-Hartman , "David S. Miller" , Jakub Kicinski , Frank Rowand , devicetree@vger.kernel.org Subject: [PATCH 1/2] of: Remove of_dev_{get,put}() Date: Thu, 11 Feb 2021 16:25:25 -0600 Message-Id: <20210211222526.1318236-2-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210211222526.1318236-1-robh@kernel.org> References: <20210211222526.1318236-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_172533_775387_5E2ABFED X-CRM114-Status: GOOD ( 23.78 ) 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_dev_get() and of_dev_put are just wrappers for get_device()/put_device() on a platform_device. There's also already platform_device_{get,put}() wrappers for this purpose. Let's update the few users and remove of_dev_{get,put}(). Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Frank Rowand Cc: Patrice Chotard Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Julia Lawall Cc: Gilles Muller Cc: Nicolas Palix Cc: Michal Marek Cc: linuxppc-dev@lists.ozlabs.org Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Cc: cocci@systeme.lip6.fr Signed-off-by: Rob Herring --- arch/powerpc/platforms/pseries/ibmebus.c | 4 ++-- drivers/net/ethernet/ibm/emac/core.c | 15 ++++++++------- drivers/of/device.c | 21 --------------------- drivers/of/platform.c | 4 ++-- drivers/of/unittest.c | 2 +- drivers/usb/dwc3/dwc3-st.c | 2 +- include/linux/of_device.h | 3 --- scripts/coccinelle/free/put_device.cocci | 1 - 8 files changed, 14 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c index 8c6e509f6967..c29328fe94e8 100644 --- a/arch/powerpc/platforms/pseries/ibmebus.c +++ b/arch/powerpc/platforms/pseries/ibmebus.c @@ -355,12 +355,12 @@ static int ibmebus_bus_device_probe(struct device *dev) if (!drv->probe) return error; - of_dev_get(of_dev); + get_device(dev); if (of_driver_match_device(dev, dev->driver)) error = drv->probe(of_dev); if (error) - of_dev_put(of_dev); + put_device(of_dev); return error; } diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index c00b9097eeea..471be6ec7e8a 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -2390,11 +2391,11 @@ static int emac_check_deps(struct emac_instance *dev, static void emac_put_deps(struct emac_instance *dev) { - of_dev_put(dev->mal_dev); - of_dev_put(dev->zmii_dev); - of_dev_put(dev->rgmii_dev); - of_dev_put(dev->mdio_dev); - of_dev_put(dev->tah_dev); + platform_device_put(dev->mal_dev); + platform_device_put(dev->zmii_dev); + platform_device_put(dev->rgmii_dev); + platform_device_put(dev->mdio_dev); + platform_device_put(dev->tah_dev); } static int emac_of_bus_notify(struct notifier_block *nb, unsigned long action, @@ -2435,7 +2436,7 @@ static int emac_wait_deps(struct emac_instance *dev) for (i = 0; i < EMAC_DEP_COUNT; i++) { of_node_put(deps[i].node); if (err) - of_dev_put(deps[i].ofdev); + platform_device_put(deps[i].ofdev); } if (err == 0) { dev->mal_dev = deps[EMAC_DEP_MAL_IDX].ofdev; @@ -2444,7 +2445,7 @@ static int emac_wait_deps(struct emac_instance *dev) dev->tah_dev = deps[EMAC_DEP_TAH_IDX].ofdev; dev->mdio_dev = deps[EMAC_DEP_MDIO_IDX].ofdev; } - of_dev_put(deps[EMAC_DEP_PREV_IDX].ofdev); + platform_device_put(deps[EMAC_DEP_PREV_IDX].ofdev); return err; } diff --git a/drivers/of/device.c b/drivers/of/device.c index aedfaaafd3e7..9a748855b39d 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -33,27 +33,6 @@ const struct of_device_id *of_match_device(const struct of_device_id *matches, } EXPORT_SYMBOL(of_match_device); -struct platform_device *of_dev_get(struct platform_device *dev) -{ - struct device *tmp; - - if (!dev) - return NULL; - tmp = get_device(&dev->dev); - if (tmp) - return to_platform_device(tmp); - else - return NULL; -} -EXPORT_SYMBOL(of_dev_get); - -void of_dev_put(struct platform_device *dev) -{ - if (dev) - put_device(&dev->dev); -} -EXPORT_SYMBOL(of_dev_put); - int of_device_add(struct platform_device *ofdev) { BUG_ON(ofdev->dev.of_node == NULL); diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 79bd5f5a1bf1..020bf860c72c 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -687,7 +687,7 @@ static int of_platform_notify(struct notifier_block *nb, pdev_parent = of_find_device_by_node(rd->dn->parent); pdev = of_platform_device_create(rd->dn, NULL, pdev_parent ? &pdev_parent->dev : NULL); - of_dev_put(pdev_parent); + platform_device_put(pdev_parent); if (pdev == NULL) { pr_err("%s: failed to create for '%pOF'\n", @@ -712,7 +712,7 @@ static int of_platform_notify(struct notifier_block *nb, of_platform_device_destroy(&pdev->dev, &children_left); /* and put the reference of the find */ - of_dev_put(pdev); + platform_device_put(pdev); break; } diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index eb51bc147440..eb100627c186 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1286,7 +1286,7 @@ static void __init of_unittest_platform_populate(void) unittest(pdev, "Could not create device for node '%pOFn'\n", grandchild); - of_dev_put(pdev); + platform_device_put(pdev); } } diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index e733be840545..b06b7092b1a2 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -274,7 +274,7 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->dr_mode = usb_get_dr_mode(&child_pdev->dev); of_node_put(child); - of_dev_put(child_pdev); + platform_device_put(child_pdev); /* * Configure the USB port as device or host according to the static diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 937f32f6aecb..d7a407dfeecb 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -26,9 +26,6 @@ static inline int of_driver_match_device(struct device *dev, return of_match_device(drv->of_match_table, dev) != NULL; } -extern struct platform_device *of_dev_get(struct platform_device *dev); -extern void of_dev_put(struct platform_device *dev); - extern int of_device_add(struct platform_device *pdev); extern int of_device_register(struct platform_device *ofdev); extern void of_device_unregister(struct platform_device *ofdev); diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci index 120921366e84..f09f1e79bfa6 100644 --- a/scripts/coccinelle/free/put_device.cocci +++ b/scripts/coccinelle/free/put_device.cocci @@ -21,7 +21,6 @@ id = of_find_device_by_node@p1(x) if (id == NULL || ...) { ... return ...; } ... when != put_device(&id->dev) when != platform_device_put(id) - when != of_dev_put(id) when != if (id) { ... put_device(&id->dev) ... } when != e1 = (T)id when != e1 = (T)(&id->dev) From patchwork Thu Feb 11 22:25:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 12084255 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 32299C433E0 for ; Thu, 11 Feb 2021 22:26:48 +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 E489464E38 for ; Thu, 11 Feb 2021 22:26:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E489464E38 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=gWDxQNP7Z3RnZotInI+7KsVXpQYC4TRQ+HDghzmRebo=; b=Pe/HW3sUJV6ie8ngOFBHQPsX0 SY6eEIFToWvy4af/+0jaRH3HdY7Y4kFZHDuD2Lz6QOH9stKc9Y46J7g7FaJKvgMx83ESnIWCgkexX FxufpQVaq1x7V7qX2DrWayFuRMqd5lFp1Y16OapflirinGeO84HOOW2Z7WDJNEyqwgeDIzGN/d7DU 68e9HR7Nt/IQAnydVcwypOTGnycYyBeIsnx2iPZ1G5H5UmzQdFwPgx1c9D3xs21jdOV4SdGSeCHEx 3cscqWc2xPKQH6lX5fj8//V1PBq7NHODcyPKVMVtQRdZBstDhuvGMGjKvfuM+BX1jiN8ybsHktQQ+ iE0bmvJbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAKP7-0004vM-Ac; Thu, 11 Feb 2021 22:25:41 +0000 Received: from mail-ot1-f52.google.com ([209.85.210.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAKP0-0004uJ-Ny for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 22:25:35 +0000 Received: by mail-ot1-f52.google.com with SMTP id k10so6720819otl.2 for ; Thu, 11 Feb 2021 14:25:34 -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=59hf+6O4K21P81t02yR2JJsizjTVRLh6ZVSrQljA/sc=; b=EPbxxNf4C6bmdUfchfUlaoU0B4OLE6yQPvjKgZZp+ex0hNivRftthochdrGOliOOGP /qwrfBnvxiZzI1eVj8Unei+YkQeSpxTmh1XCY9b9nzAJDe7pWMikoD4d1DzT0DDYC7uZ DlYrZxavXUjXbS78yRFseX9wPvqIIZUlZterJJuev2zwz2GaPAOvR24TuVTo87shavrm W8uz3dQ1Zlf5XQTWJ9q4yFhJhdvk9C1AYBMB6ybwByq+cEQ8IjtnDcZbalB/uOdPDjns XYg0/T4JwMpow9+SbpZRVQ+q2WQNrJXRp1sjb7OBwQ3RI6mq/y71Co3lM2iu6Z9Bh+24 luOQ== X-Gm-Message-State: AOAM531cMU5MTaiELPaAeYf8uhI+tO5OGTSMxY4WsVVvLQVR2yKdzbY3 li4h6qk933RA06RaUT8LxQ== X-Google-Smtp-Source: ABdhPJyoVcKGRF5I+pIki+Oo8A5jCC9o1Ifs/C5d7kBMPZRLIA+fMwLf/LFw7mtzzAZNV7Q3EHU3YQ== X-Received: by 2002:a9d:605a:: with SMTP id v26mr136880otj.275.1613082333675; Thu, 11 Feb 2021 14:25:33 -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 j25sm978030otn.55.2021.02.11.14.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 14:25:32 -0800 (PST) From: Rob Herring To: Michael Ellerman , Greg Kroah-Hartman , "David S. Miller" , Jakub Kicinski , Frank Rowand , devicetree@vger.kernel.org Subject: [PATCH 2/2] driver core: platform: Drop of_device_node_put() wrapper Date: Thu, 11 Feb 2021 16:25:26 -0600 Message-Id: <20210211222526.1318236-3-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210211222526.1318236-1-robh@kernel.org> References: <20210211222526.1318236-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_172534_846516_55B42B9E X-CRM114-Status: GOOD ( 17.90 ) 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 --- 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..c31bc9e92dd1 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) {