Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1057135rwd; Tue, 13 Jun 2023 04:23:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65GA6a4B6Llqe5K8/X26/HKDcwbYy0c7D2eiZ77Vg3krszugdM+nYrIJcptqk/zRLHiRlb X-Received: by 2002:a17:903:11c9:b0:1b3:815b:cf02 with SMTP id q9-20020a17090311c900b001b3815bcf02mr9451118plh.19.1686655433005; Tue, 13 Jun 2023 04:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686655432; cv=none; d=google.com; s=arc-20160816; b=b716PLza/c+dxOw2nbUX2LhJB/MG/GWrKWoO7tV3fozYw5gF7nhJKW0uWcRn1c+LNY PX88q0LqDJFqUKN86r+C+aqMf9jp44DrN5wVHUuh/GUqGK9yrB93LSFL4xQhSnT4QFfJ u7C77P2UTGCYXFhwrsejznhF2GozAq8Q0KlcNcA44I0kyjK0idcIZYZdrBugDv+9EjlQ Cto71oJp1aZiFlpyAQQW7ytbc3KM//qGeZeEN5igZ6FqCovSi77mpEBMRzuoAcOfv+11 VNu6fHieAao+Z0mvf8EfgUY/HUhB7RkRMUZNfzOWAiM3sNZwHLAcNjbZfwALpOvI0aw8 y4gA== 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=WsDEEspPWul74UZLXdW4Ecwc8Oa61gwjOHH6cUKWaqk=; b=zkxD86f/6cxJR+9CJf9/XkdYsFQSJptuKRvBVrA1oR2Hm8wEB/LZ16l+0qumqLBwM/ dqc29L0jQWOmcoMqbwVBotmbw9pFPxU4aX/GvFaCzA+czA5xJVbHzuskFeOwGSxYrrZS 2d0IGhTp5Z5QKa8H99tfxCIaMFoDcl+PNIfRhI5HMSVda9tfYW3SEtVj8YV+2pS8xtMc IfFdZpf0FsmQ0e++rhK7GCEvcDCDVMVCBoopr53DlWqodo4Qsecs4gMC/iSK/Fbq3VVs nIwm0z3T+xIHPKr6sEAnF7h3LyY2vXvQFZ8ul3sS1c3ST+rvpHw10xkCd30/flxc2U0N RQfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=KHWdLqkr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1p44QGyb; 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 y15-20020a17090322cf00b001a99b9d767csi8653413plg.166.2023.06.13.04.23.40; Tue, 13 Jun 2023 04:23:52 -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=KHWdLqkr; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=1p44QGyb; 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 S239377AbjFMLVl (ORCPT + 99 others); Tue, 13 Jun 2023 07:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240019AbjFMLKA (ORCPT ); Tue, 13 Jun 2023 07:10:00 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CD9892; Tue, 13 Jun 2023 04:09:59 -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 1DB7E1FD92; Tue, 13 Jun 2023 11:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686654598; 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=WsDEEspPWul74UZLXdW4Ecwc8Oa61gwjOHH6cUKWaqk=; b=KHWdLqkrddz7uVBb+Yv2fY2eeaje+oPTUxlMVi45GkBNEFZRssE8WRvLHIyXzyPvvxTBGW nD2v2MncxM+de/iQ2RpaGKY6Dpy/cRzLpisJR2pYyLjOU2mxw6oMsoLmVKYSLk2vcqmA9g Qkg6Da7q7sK1BJ/S3JW+9YyLm3elEx4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686654598; 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=WsDEEspPWul74UZLXdW4Ecwc8Oa61gwjOHH6cUKWaqk=; b=1p44QGybnwv43z9lUWFXzQUhcsUiV9Pb7+AYixEqsnWUfaiwjJ020l547sviQBvkhxT8m4 FWcqeQMWDsQ0mBAA== 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 A846A13A47; 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 iLoDKIVOiGR8CQAAMHmgww (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 , Laurent Pinchart , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , stable@vger.kernel.org Subject: [PATCH v3 05/38] backlight/lv5207lp: Compare against struct fb_info.device Date: Tue, 13 Jun 2023 13:06:40 +0200 Message-ID: <20230613110953.24176-6-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 lv5207lp_platform_data refers to a platform device within the Linux device hierarchy. The test in lv5207lp_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) Fixes: 82e5c40d88f9 ("backlight: Add Sanyo LV5207LP backlight driver") Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Yoshinori Sato 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: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson --- drivers/video/backlight/lv5207lp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lv5207lp.c b/drivers/video/backlight/lv5207lp.c index 00673c8b66ac5..99ba4bc0a500d 100644 --- a/drivers/video/backlight/lv5207lp.c +++ b/drivers/video/backlight/lv5207lp.c @@ -67,7 +67,7 @@ static int lv5207lp_backlight_check_fb(struct backlight_device *backlight, { struct lv5207lp *lv = bl_get_data(backlight); - return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->dev; + return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->device; } static const struct backlight_ops lv5207lp_backlight_ops = { -- 2.41.0