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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 C61D9C433DF for ; Sun, 17 May 2020 19:02:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AAAAA207D3 for ; Sun, 17 May 2020 19:02:24 +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="czbyCVEw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbgEQTCY (ORCPT ); Sun, 17 May 2020 15:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbgEQTCY (ORCPT ); Sun, 17 May 2020 15:02:24 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF23C061A0C; Sun, 17 May 2020 12:02:23 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id h26so6113346lfg.6; Sun, 17 May 2020 12:02:23 -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=IvDsy/nPUi02XD/vfbNhyiPf7njrVCeQx3+gL16YDUg=; b=czbyCVEw53JapFDgPo5oUqLk+4ZpOVDDGegu4yOGim/1D2iWS5LoJ4s+WO986t4Oca QYdPzvpcnbinj/gMkr8AGQJnSGX9/PpX1YsMM1iCQkybIRFzRfnLhy/OKyD6Y2e5EQpf iUcstdjY2Q1zwjtH9KwAccx5AKbadwx7zIakR4kj4GnJu3BZAkuN4rld16ch04aCqXRJ 7K/zgUfwm+2r4nPkAoccrJv76FqVZZBljDlI3MsO75hcDAbcbb6xoy3O5mLvyDDs9bCI A4UQFkaihP7w768jWRGqH7j2Z93jaTWvNnhepZ4B5Gia8GTxaIoqjvLJcmmlz4TtW2L5 r5KQ== 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=IvDsy/nPUi02XD/vfbNhyiPf7njrVCeQx3+gL16YDUg=; b=H8WXD5elJbu7yBiAjP18wZAZsNfpqAV/tHkyBAwU9Eov3RD+z6f45baXnGfjQ1bkEX Xqpi/LrXHqwlpuiHVs9DBK9hS60y5W2P3bW3pHtBKAuBjRMyo/q/AQDIcEqDHhKhRVHg hHtEdQsNzrbg8a2IV0+mJKTAUnSOQTgGOWOLps6Uf4cLSuyDDRMtEXLmEgrbZIRYhZZz 6H5+b7UfRXX3DYqUuAwA44oNm1pLtluko5O/ZyCMogCjWnirRiYfL+HAlckfqjAVNFOc nDnsinpDKUeYXfWVxyMBcVFJVC860iuKfMWsSUomOuFbfsT9pqyKJFKRfenkq2yC4Cpa AyGA== X-Gm-Message-State: AOAM533fEFMHXE1pgKjAu6bnVMT641G7UxlZlIXk+CF+fLPhdI2SNEqO bCEaxQa73mcPOS9b6KairCw= X-Google-Smtp-Source: ABdhPJxJEsVz8vUKYsbXCKwcWbHSyuHi0wKOTOertCRfru+9AvoX2lvlXxp8S+s1/M35SOwFd5ubPQ== X-Received: by 2002:a19:5f5c:: with SMTP id a28mr9085446lfj.98.1589742142136; Sun, 17 May 2020 12:02:22 -0700 (PDT) Received: from saturn.lan ([2a00:fd00:805f:db00:5d55:b3eb:397b:9086]) by smtp.gmail.com with ESMTPSA id t20sm3282535lfl.17.2020.05.17.12.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 12:02:21 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Jingoo Han , Lee Jones , Daniel Thompson , Peter Ujfalusi , Tomi Valkeinen Cc: Andy Gross , Bartlomiej Zolnierkiewicz , Bjorn Andersson , Daniel Vetter , David Airlie , Douglas Anderson , Jani Nikula , Jonathan Corbet , Linus Walleij , linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Michael Hennerich , patches@opensource.cirrus.com, Russell King , Sam Ravnborg , Support Opensource , Thierry Reding , Thomas Zimmermann , Uwe Kleine-Konig Subject: [PATCH v2 13/16] backlight: make of_find_backlight static Date: Sun, 17 May 2020 21:01:36 +0200 Message-Id: <20200517190139.740249-14-sam@ravnborg.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200517190139.740249-1-sam@ravnborg.org> References: <20200517190139.740249-1-sam@ravnborg.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There are no external users of of_find_backlight, as they have all changed to use the managed version. Make of_find_backlight static to prevent new external users. Signed-off-by: Sam Ravnborg Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han --- drivers/video/backlight/backlight.c | 31 ++++++++++------------------- include/linux/backlight.h | 6 ------ 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 2212f0e3570e..e23b09d03a65 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -650,22 +650,7 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node) EXPORT_SYMBOL(of_find_backlight_by_node); #endif -/** - * of_find_backlight - Get backlight device - * @dev: Device - * - * This function looks for a property named 'backlight' on the DT node - * connected to @dev and looks up the backlight device. - * - * Call backlight_put() to drop the reference on the backlight device. - * - * Returns: - * A pointer to the backlight device if found. - * Error pointer -EPROBE_DEFER if the DT property is set, but no backlight - * device is found. - * NULL if there's no backlight property. - */ -struct backlight_device *of_find_backlight(struct device *dev) +static struct backlight_device *of_find_backlight(struct device *dev) { struct backlight_device *bd = NULL; struct device_node *np; @@ -691,7 +676,6 @@ struct backlight_device *of_find_backlight(struct device *dev) return bd; } -EXPORT_SYMBOL(of_find_backlight); static void devm_backlight_release(void *data) { @@ -702,9 +686,16 @@ static void devm_backlight_release(void *data) * devm_of_find_backlight - find backlight for a device * @dev: the device * - * Device managed version of of_find_backlight(). - * The reference on the backlight device is automatically - * dropped on driver detach. + * This function looks for a property named 'backlight' on the DT node + * connected to @dev and looks up the backlight device. + * The lookup is device managed so the reference to the backlight device + * is automatically dropped on driver detach. + * + * Returns: + * A pointer to the backlight device if found. + * Error pointer -EPROBE_DEFER if the DT property is set, but no backlight + * device is found. + * NULL if there's no backlight property. */ struct backlight_device *devm_of_find_backlight(struct device *dev) { diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 308aec67fa4f..99e7cdace2be 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -494,14 +494,8 @@ of_find_backlight_by_node(struct device_node *node) #endif #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) -struct backlight_device *of_find_backlight(struct device *dev); struct backlight_device *devm_of_find_backlight(struct device *dev); #else -static inline struct backlight_device *of_find_backlight(struct device *dev) -{ - return NULL; -} - static inline struct backlight_device * devm_of_find_backlight(struct device *dev) { -- 2.25.1