From patchwork Fri Jul 3 18:45:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11642705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD45B13BD for ; Fri, 3 Jul 2020 18:46:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 87C782088E for ; Fri, 3 Jul 2020 18:46:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IJ2pvZZu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87C782088E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99C1D6EBAD; Fri, 3 Jul 2020 18:46:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 225C96EBAD for ; Fri, 3 Jul 2020 18:46:46 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id f5so22207369ljj.10 for ; Fri, 03 Jul 2020 11:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hT0shvcR5E7UTkS/zrKMtVL3+oENb6Mn/8BtotMdc8Y=; b=IJ2pvZZu0XFyrYCZR2R+QxMO9PRsdBwoi67YSGTnXEoC6Xq35Un0PVtT9vh44xnDXP TEGeRIMsZGiYY6Awzwdq+jUzsSGLB4ADGwQ5ok8jjv4wOuWndRvZyE5OMfDznoZo90Th pQcuWXf8XYXOT5JioZmngSaaYWiRgjJLjdtvcWBOXqXAbHLIakqb1FUs9Jj7IOY1MgLt ONhxzqoJfYbWq2QSd6qoKs6tCTsLdmwEw77REvuGMEl0iwJS2rQFwTCmd9xNtGeisMjM gjOHzaRw4srWPfNxRglgv6ILapKfzB1ETl+0v76GQhbHDgft/Z8QaE1QiJoHBEmHxr1+ y7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hT0shvcR5E7UTkS/zrKMtVL3+oENb6Mn/8BtotMdc8Y=; b=oUI2wnJXUR/fGei/4LOwkrrpgB6cKKiGhBQmyOOuIs0x8gqZrkRBqxhsBopoblDBOR ZEi958hdDTsDrW+t2JLKuYhkVIYRR+0WCRlBaT7nsK7cCnaGIKHf0V1iNyUE4oXRjOhu lVpibP+GaYPuykvJDgSbhkxcaeUME1lxbZXBQvkFU2zrSgr+wE2Jti1KGxdeq5HxXwJ+ GIJjm3GAHJSVMsgTQUjgUOt8aLi+JwrAUuXUFVToajpfPqh+M5gNSMJIfxr3l+NYz3P5 n+Uf84yM6aVkNxpitBgf8GBmulHY0Af8guy9qPlX2s9D7jdMDI9AygVQPT06UtpyAZCU qjTw== X-Gm-Message-State: AOAM530L9B9cS1VEoVy4lpEqLnxTMSXusqA3MpR/aQzeCMXUHpmltnah LRq/hrDqBDV2arTLbWuzBhqdGkLXoY4= X-Google-Smtp-Source: ABdhPJxYcPNmrmNBGSR3OEKzHcluG3e3qxVbhV/zKtVskDiIRKCh+SQkMLB/z9B+fykgAg9N0oyykQ== X-Received: by 2002:a2e:3311:: with SMTP id d17mr19563882ljc.13.1593802004416; Fri, 03 Jul 2020 11:46:44 -0700 (PDT) Received: from saturn.lan ([2a00:fd00:805f:db00:4025:a614:1d5c:b7bc]) by smtp.gmail.com with ESMTPSA id h22sm4404224ljg.1.2020.07.03.11.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 11:46:44 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Jingoo Han , Lee Jones , Daniel Thompson Subject: [PATCH v4 20/20] backlight: make of_find_backlight_by_node() static Date: Fri, 3 Jul 2020 20:45:46 +0200 Message-Id: <20200703184546.144664-21-sam@ravnborg.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200703184546.144664-1-sam@ravnborg.org> References: <20200703184546.144664-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Support Opensource , Michael Hennerich , Bartlomiej Zolnierkiewicz , David Airlie , Daniel Vetter , Tomi Valkeinen , Jonathan Corbet , Emil Velikov , Bjorn Andersson , Peter Ujfalusi , Andy Gross , Thierry Reding , Thomas Zimmermann , linux-arm-msm@vger.kernel.org, Uwe Kleine-Konig , Sam Ravnborg , patches@opensource.cirrus.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There are no external users of of_find_backlight_by_node(). Make it static so we keep it that way. v2: - drop EXPORT of of_find_backlight_by_node Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Reported-by: kernel test robot --- drivers/video/backlight/backlight.c | 23 +++++++++-------------- include/linux/backlight.h | 10 ---------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 06f4da3c58e1..ff84e6607486 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -649,19 +649,9 @@ static int of_parent_match(struct device *dev, const void *data) return dev->parent && dev->parent->of_node == data; } -/** - * of_find_backlight_by_node() - find backlight device by device-tree node - * @node: device-tree node of the backlight device - * - * Returns a pointer to the backlight device corresponding to the given DT - * node or NULL if no such backlight device exists or if the device hasn't - * been probed yet. - * - * This function obtains a reference on the backlight device and it is the - * caller's responsibility to drop the reference by calling put_device() on - * the backlight device's .dev field. - */ -struct backlight_device *of_find_backlight_by_node(struct device_node *node) +/* Find backlight device by device-tree node */ +static struct backlight_device * +of_find_backlight_by_node(struct device_node *node) { struct device *dev; @@ -669,7 +659,12 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node) return dev ? to_backlight_device(dev) : NULL; } -EXPORT_SYMBOL(of_find_backlight_by_node); +#else +static struct backlight_device * +of_find_backlight_by_node(struct device_node *node) +{ + return NULL; +} #endif static struct backlight_device *of_find_backlight(struct device *dev) diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8b43fd90d84a..fa443899b4ee 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -466,16 +466,6 @@ static inline void * bl_get_data(struct backlight_device *bl_dev) return dev_get_drvdata(&bl_dev->dev); } -#ifdef CONFIG_OF -struct backlight_device *of_find_backlight_by_node(struct device_node *node); -#else -static inline struct backlight_device * -of_find_backlight_by_node(struct device_node *node) -{ - return NULL; -} -#endif - #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) struct backlight_device *devm_of_find_backlight(struct device *dev); #else