Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1056578rwd; Tue, 13 Jun 2023 04:23:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dq7d4+xJHKU06bkqIPg5MaY2s/zzGeWduOdeVESjcXT7G4QdMDKQguXZtCH8bXlwR6ChO X-Received: by 2002:a17:902:e842:b0:1b2:4fea:c62 with SMTP id t2-20020a170902e84200b001b24fea0c62mr10143400plg.30.1686655401300; Tue, 13 Jun 2023 04:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686655401; cv=none; d=google.com; s=arc-20160816; b=SaR3WCc9vHtwvMRHw38osI/rpq7dg0t0rVeuSCMj7VpY4RIaBH14k9VcY1A/XuoECE GYsONjMb5UuwoQx0xaS1bZpCWNyiUPKTpOeU9Ou7DlPcfoRKogqRUDwhLCB7EHHrLLYj M7U6N8GdGF4EfHFJ1Hp0ouSzL7XStpD2ED3QL6tw6IiwWng8NAo+KhtxzxJ9wtM/G7pJ upey/a+e2S+g2VtKTQ6lUvn0zMYC+GYVFoubgq7yTqpmNkU0Jr1POxyBCbhs7v+L3MkN 7ppWLLUrhR6OVSALE6JoLsScBo8w6H3cTFKqqzEs6padQvbcZymLhiN7iqTWcSqeZNZv w8cA== 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=8F8zYOtuNhkeGEJGjTGNJf7JW+gWS4lDFOo66WeTx0E=; b=s/2aC7d/dQ+CabWRInFVuU57MoyiirKOmZYWXp/k+pj3zbfe3PdtDxKOkIkc1+9DSc HPtvXCmgnQGoCuGM1S/KFZWFGUetVZHXWWFRy9rzjDFSrzsxh/kT38GOVW3FWNg9oLbc +gCJFULAtAjzlyQi9sfL94ZSpcsqDPX1Cj1dowySIXS/MMSgX0Mf7/Vl2r7lNojWUKa2 jtCMbDS5TOxy/QzoQrqzt/TGks+YQTFVknqbfyUnI3bC+qmrWhHRw9hM/J29e+BOeEN4 5D0omVeTfOxxFZa27LtyJGuZO0yYtdSC9cEgp2RZvwbQiphwRHohyHQOP9tbaGCs2HCU /lBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ECgCmMIN; 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 u11-20020a170902e5cb00b001b382b2d2efsi7281762plf.28.2023.06.13.04.23.05; Tue, 13 Jun 2023 04:23:21 -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=ECgCmMIN; 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 S240584AbjFMLVh (ORCPT + 99 others); Tue, 13 Jun 2023 07:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239624AbjFMLJ7 (ORCPT ); Tue, 13 Jun 2023 07:09:59 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C468710DA; 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-out2.suse.de (Postfix) with ESMTPS id 44F201FD91; 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=8F8zYOtuNhkeGEJGjTGNJf7JW+gWS4lDFOo66WeTx0E=; b=ECgCmMINGISn/lWQG1aZEQVqxvjvla/Qc2oAMkkd0gA6ktxAzxHJeQc5qj/CU/QJw+tNYg v407xsy2u8ittm9pMqsBSjPx1uE9z0jZGoGH1kC98865iPYqV8F21E6VMgnpZPBhumW3zd pDdk+h/GcnMijj7JSvtK12cleuuph1I= 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=8F8zYOtuNhkeGEJGjTGNJf7JW+gWS4lDFOo66WeTx0E=; b=7nTrivDvMYM/AT6jFbdL/EDQgl+DHpD7Miu3nB5yKE4CbLdpSmyIgMuOeJk5k6CgLXIYn6 uLQpwU7uc1YMxBCA== 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 D638A13A47; Tue, 13 Jun 2023 11:09:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UOVpM4ROiGR8CQAAMHmgww (envelope-from ); Tue, 13 Jun 2023 11:09:56 +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 , Laurent Pinchart , Rich Felker , John Paul Adrian Glaubitz , stable@vger.kernel.org Subject: [PATCH v3 03/38] backlight/gpio_backlight: Compare against struct fb_info.device Date: Tue, 13 Jun 2023 13:06:38 +0200 Message-ID: <20230613110953.24176-4-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 Struct gpio_backlight_platform_data refers to a platform device within the Linux device hierarchy. The test in gpio_backlight_check_fb() compares it against the fbdev device in struct fb_info.dev, which is different. Fix the test by comparing to struct fb_info.device. Fixes a bug in the backlight driver and prepares fbdev for making struct fb_info.dev optional. v2: * move renames into separate patch (Javier, Sam, Michael) Signed-off-by: Thomas Zimmermann Fixes: 8b770e3c9824 ("backlight: Add GPIO-based backlight driver") Cc: Laurent Pinchart Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: linux-sh@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: # v3.12+ Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson --- drivers/video/backlight/gpio_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index 6f78d928f054a..5c5c99f7979e3 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -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->dev; + return gbl->fbdev == NULL || gbl->fbdev == info->device; } static const struct backlight_ops gpio_backlight_ops = { -- 2.41.0