Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5611967rwd; Mon, 12 Jun 2023 07:26:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4s1m3LIOFquAmQI9rrJNEPm4x0RUJpbu6u9AUYdbuHZwCeskcTiCpUx4G9K7YKMxocBe0i X-Received: by 2002:a05:6a21:99aa:b0:114:6f3c:4332 with SMTP id ve42-20020a056a2199aa00b001146f3c4332mr10961561pzb.24.1686579979971; Mon, 12 Jun 2023 07:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686579979; cv=none; d=google.com; s=arc-20160816; b=QMqLKxIXsI1EVwkk1VK5DB+tbX2ZsleM76UyrkNo4GPhjR0jyQBsLtUig0+P+L8WZU djOO51vG3yV4uW7jEFRwA0sUcrA4wWbYu7Xo0ilB1ya+TR2fmz9MIk1INw0VU2twFyRQ J2iZ9DYWCzrpfrW0/HPuI0KFvQV6M9O5WqqIfmlfP2IvAir2Xt5JDNfhGXBO5qqLRmiI UnWSLkOg2mx0HCnAhoJsmGLj7ge+1OVXz0N5lvPsIxxDllZAuNDiGCtGqvjPzZwZIvKV cWaawvg9k/SFZN+Qg8FvUAKMkZObl4KkkRP9jr9XaUeIgtCYtHtPpTCHwJv/WZJBy+jO 9v5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=WCRr3tcfQ+ViTqvRJUG7w6CzJZFM3ZnmBQeGqDoFNyA=; b=BakO3RHJ4W76P/Q6R092b3BkpTiq4ewX916AZDQFl/2Em2aFzqyRobZdVBOslprl/y 8nlw2bHzqqR1DxGsL/3MGQLCchYGNIpcSX4WcnZRWZqlu8WVPQVIj7TB0iPnZFgy3J27 gE1qRzpSQnFW2bU9Z9Kp1VXk3d0BZOtq22bTU+aZPbmPm7vm88q1Zwdyz45ZcjKWGQyD eXa+q95yc8P3CVwwpoT6qGZd36NfhGynj426jqQRT7pNkoOn2+DCr2I8Zdf2X5AWf9aT +ZwhO2nQgzQbx5P6fuCbShjZhDDSWZxcH0xYgk3WzBCyv6uNAhzQuPYNQVgG70Lb66MK Qw1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B3c7FJ0o; dkim=neutral (no key) header.i=@suse.de header.b=nP6ok9tG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e23-20020a637457000000b00533ffeaca3dsi6797309pgn.40.2023.06.12.07.26.07; Mon, 12 Jun 2023 07:26:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=B3c7FJ0o; dkim=neutral (no key) header.i=@suse.de header.b=nP6ok9tG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237528AbjFLOOV (ORCPT + 99 others); Mon, 12 Jun 2023 10:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237249AbjFLON6 (ORCPT ); Mon, 12 Jun 2023 10:13:58 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849B810E9; Mon, 12 Jun 2023 07:13:57 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0393A201D6; Mon, 12 Jun 2023 14:13:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686579236; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WCRr3tcfQ+ViTqvRJUG7w6CzJZFM3ZnmBQeGqDoFNyA=; b=B3c7FJ0o7rKovAlVqxsu+Jc3wMWjZdExXH2p5ByRwfcFc+ilXqYes3ifuEtwAiiCrDIhN8 cPt41wJHss0O3oTTg6pLfOWZEbyVZDdAH1WzxWbDAJligcdGIGgmJWO5l3MfvcQSUtUMFl wlaLfObvsRRjCNdzMpHBMhHseFCyxzg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686579236; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WCRr3tcfQ+ViTqvRJUG7w6CzJZFM3ZnmBQeGqDoFNyA=; b=nP6ok9tGNYJPhTfSJhnOUhfUDt2dDp8Vtejn+3CZPIECp+BZnHlWEb0ubXBjmw/nIr8MW4 sgkJX4ml2AN+WhBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A2A3C13A67; Mon, 12 Jun 2023 14:13:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kCbcJiMoh2RwGQAAMHmgww (envelope-from ); Mon, 12 Jun 2023 14:13:55 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, javierm@redhat.com, sam@ravnborg.org, deller@gmx.de, geert+renesas@glider.be, lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, dan.carpenter@linaro.org, michael.j.ruhl@intel.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sh@vger.kernel.org, linux-omap@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Thomas Zimmermann , Rich Felker , John Paul Adrian Glaubitz Subject: [PATCH v2 04/38] backlight/gpio_backlight: Rename field 'fbdev' to 'dev' Date: Mon, 12 Jun 2023 16:07:42 +0200 Message-ID: <20230612141352.29939-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612141352.29939-1-tzimmermann@suse.de> References: <20230612141352.29939-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the field 'fbdev' in struct gpio_backlight_platform_data and struct gpio_backlight to 'dev', as they store pointers to the Linux platform device; not the fbdev device. Makes the code easier to understand. Signed-off-by: Thomas Zimmermann Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: linux-sh@vger.kernel.org --- arch/sh/boards/mach-ecovec24/setup.c | 2 +- drivers/video/backlight/gpio_backlight.c | 6 +++--- include/linux/platform_data/gpio_backlight.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 674da7ebd8b7f..310513646c9b3 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c @@ -386,7 +386,7 @@ static struct property_entry gpio_backlight_props[] = { }; static struct gpio_backlight_platform_data gpio_backlight_data = { - .fbdev = &lcdc_device.dev, + .dev = &lcdc_device.dev, }; static const struct platform_device_info gpio_backlight_device_info = { diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index 5c5c99f7979e3..d3bea42407f15 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -17,7 +17,7 @@ #include struct gpio_backlight { - struct device *fbdev; + struct device *dev; struct gpio_desc *gpiod; }; @@ -35,7 +35,7 @@ static int gpio_backlight_check_fb(struct backlight_device *bl, { struct gpio_backlight *gbl = bl_get_data(bl); - return gbl->fbdev == NULL || gbl->fbdev == info->device; + return !gbl->dev || gbl->dev == info->device; } static const struct backlight_ops gpio_backlight_ops = { @@ -59,7 +59,7 @@ static int gpio_backlight_probe(struct platform_device *pdev) return -ENOMEM; if (pdata) - gbl->fbdev = pdata->fbdev; + gbl->dev = pdata->dev; def_value = device_property_read_bool(dev, "default-on"); diff --git a/include/linux/platform_data/gpio_backlight.h b/include/linux/platform_data/gpio_backlight.h index 1a8b5b1946fe4..323fbf5f76139 100644 --- a/include/linux/platform_data/gpio_backlight.h +++ b/include/linux/platform_data/gpio_backlight.h @@ -8,7 +8,7 @@ struct device; struct gpio_backlight_platform_data { - struct device *fbdev; + struct device *dev; }; #endif -- 2.41.0