Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1056392rwd; Tue, 13 Jun 2023 04:23:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WguiVu6eFf/jHdqAMUzJ8gp0PVPp1qDVdTTBwkXiQcqYTfw/jf2Z/uLx4qtCrtINHijqC X-Received: by 2002:a05:6902:603:b0:bd4:c299:a80a with SMTP id d3-20020a056902060300b00bd4c299a80amr708027ybt.10.1686655392887; Tue, 13 Jun 2023 04:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686655392; cv=none; d=google.com; s=arc-20160816; b=jGB1JVWe0SEWULqgWez+UV/81PQKInZJaj2nkiWlJhpjc++L1kLiYPQ1OFhGhj8kke BsnXhoy/WZLkwKhJ8Xh8bMDu5EatA74+es9joGhjwl9yoZppfzgKWM4OZyEg04l05b/H 0qa5p1ipwGG89cd1c/R5dAU9SfAqkBDzxQoV7KnjXaasUhxwXqPZYTf7o14Q8L054XZk OlQ6L09K07X5qddI9dle6K0s2C+j3255DpjrHL77S06zjq8YLytrWCTCrGXKdYO/ZMma WttSHpwOTiSOeBVZrCj0UIZuz8Emc7h7WYSyp8dyV9SJg/2/k80ZPPMVyC7sAgJrTIq2 DmPg== 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=759wPSS2YZhgjZvqqs3DuVdRpXqcbQxPoHRkgNwrzjQ=; b=WMGuF0XXL64PTD7EK05Xa8jNaa/8M8Xq2Ib6U6yV3IIAqdMXGlpHhsdYD3mV78KLtB QvNxMcdcJIoweTppWrZMzCib4X4IItJYlHrltL8HWukRUqDNDbqH7wOUlFTl+LJVH65O loaqyK9SI7IeU7PEDdf/SqGoafPTcqZERx8SyqwXb5HYVWWsZAfceXMaqzTOydB5vPM8 YxQsZMjKZhR/gcJZLIoy0ZVf61HuwrA+yAOt3U228BAbgZLlufi9NBlXipN92xNm6tzG kw7L9vtnfOPxpZhM5SvPvd+utlAaiVdYe6T2H5JV8gCxSsm7xX+vq8EKAlONCirFOi57 EMTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=hB2LOkFd; dkim=neutral (no key) header.i=@suse.de; 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 oj15-20020a17090b4d8f00b0024dfb95d54csi4686658pjb.177.2023.06.13.04.23.00; Tue, 13 Jun 2023 04:23:12 -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=hB2LOkFd; dkim=neutral (no key) header.i=@suse.de; 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 S239585AbjFMLVe (ORCPT + 99 others); Tue, 13 Jun 2023 07:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239966AbjFMLJ7 (ORCPT ); Tue, 13 Jun 2023 07:09:59 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E57AF10DE; Tue, 13 Jun 2023 04:09:58 -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-out1.suse.de (Postfix) with ESMTPS id A2A2E223E7; Tue, 13 Jun 2023 11:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686654597; 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=759wPSS2YZhgjZvqqs3DuVdRpXqcbQxPoHRkgNwrzjQ=; b=hB2LOkFdJ+zgRNkt1Xil1QsWxaSSGjhWIEkLnnB+ViefVknwgzP+1uVoJXm5oVEYtOKwaK iYZSd1mpgCuQz+47nSm+EndIsjAN/yhXD8m4zlUlNJ7H5V7IDE+3/2gq0puNLgJNUc0cjd cNZltbFm3n6FwjCID/HOxOq/GANXEjI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686654597; 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=759wPSS2YZhgjZvqqs3DuVdRpXqcbQxPoHRkgNwrzjQ=; b=IEJlUU0QgQc1tc+jsRfLDZZsU94E6dRYpY9GsfopDnR7T62da6D3m9rgkIJCnVqZsF/Poi VUtvvBgd/IgiQsDw== 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 490D313483; Tue, 13 Jun 2023 11:09:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QJ7tEIVOiGR8CQAAMHmgww (envelope-from ); Tue, 13 Jun 2023 11:09:57 +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 v3 04/38] backlight/gpio_backlight: Rename field 'fbdev' to 'dev' Date: Tue, 13 Jun 2023 13:06:39 +0200 Message-ID: <20230613110953.24176-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230613110953.24176-1-tzimmermann@suse.de> References: <20230613110953.24176-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,URIBL_BLOCKED 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 Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson --- 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