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=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,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 A5F2AC433E1 for ; Fri, 15 May 2020 20:42:59 +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 80FF520756 for ; Fri, 15 May 2020 20:42:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80FF520756 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 ED6196E0DD; Fri, 15 May 2020 20:42:58 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6AD5B6E0DD for ; Fri, 15 May 2020 20:42:57 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 61A66804E6; Fri, 15 May 2020 22:42:47 +0200 (CEST) Date: Fri, 15 May 2020 22:42:45 +0200 From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Jingoo Han , Lee Jones , Daniel Thompson Subject: Re: [PATCH v1 06/18] backlight: make of_find_backlight_by_node() static Message-ID: <20200515204245.GA543522@ravnborg.org> References: <20200514191001.457441-1-sam@ravnborg.org> <20200514191001.457441-7-sam@ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200514191001.457441-7-sam@ravnborg.org> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=MOBOZvRl c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=7gkXJVJtAAAA:8 a=KKAkSRfTAAAA:8 a=pGLkceISAAAA:8 a=7mnRyIj4PDRz4dp46dkA:9 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=cvBusfyB2V15izCimMoJ:22 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: Kate Stewart , Kefeng Wang , David Airlie , Daniel Vetter , Bjorn Andersson , Thierry Reding , Laurent Pinchart , Jonathan Corbet , Tomi Valkeinen , Russell King , Andy Gross , Uwe Kleine Konig , linux-pwm@vger.kernel.org, Michael Hennerich , Bartlomiej Zolnierkiewicz , Jani Nikula , linux-arm-msm@vger.kernel.org, Jyri Sarha , Thomas Gleixner , Allison Randal , Support Opensource , patches@opensource.cirrus.com, Douglas Anderson , Zheng Bin , Thomas Zimmermann , Enrico Weigelt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi myself and others. On Thu, May 14, 2020 at 09:09:49PM +0200, Sam Ravnborg wrote: > There are no external users of of_find_backlight_by_node(). > Make it static so we keep it that way. > > Signed-off-by: Sam Ravnborg > Cc: Lee Jones > Cc: Daniel Thompson > Cc: Jingoo Han > --- > drivers/video/backlight/backlight.c | 22 +++++++++------------- > include/linux/backlight.h | 10 ---------- > 2 files changed, 9 insertions(+), 23 deletions(-) > > diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c > index 547aa3e1a03a..91dfcf4a2087 100644 > --- a/drivers/video/backlight/backlight.c > +++ b/drivers/video/backlight/backlight.c > @@ -577,19 +577,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; > > @@ -598,6 +588,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); Dropped this EXPORT in v2. Sam > +#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 3d757a850b88..b7839ea9d00a 100644 > --- a/include/linux/backlight.h > +++ b/include/linux/backlight.h > @@ -198,16 +198,6 @@ struct generic_bl_info { > void (*kick_battery)(void); > }; > > -#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 > -- > 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel