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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1586ECA0EC6 for ; Mon, 11 Sep 2023 21:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239997AbjIKVuV (ORCPT ); Mon, 11 Sep 2023 17:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240944AbjIKO5l (ORCPT ); Mon, 11 Sep 2023 10:57:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 164FE1B9; Mon, 11 Sep 2023 07:57:37 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32EA6C433C7; Mon, 11 Sep 2023 14:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694444256; bh=Dznp5youNcMrftsTclfp7+aaStsGZ9l1YRlYN59lz+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shAb8gD5m7mhVtM7W3PtXSmimHZiLf2ub+VOcB3360Tw9UhxMFtX2r1yDT9+yY/i+ VECGlq+7ALhVWtH4Jicfjd60ROwbBsrZHD2eNr1YfgrUspW6jDW0fHCTId5dpnorwU J4hPbl/RXxu4a6lkPLGZ7O5tKNp4Egb6Nf3VIW9Y= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Zimmermann , Laurent Pinchart , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Lee Jones , Daniel Thompson , Jingoo Han , linux-sh@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Sam Ravnborg Subject: [PATCH 6.4 665/737] backlight/lv5207lp: Compare against struct fb_info.device Date: Mon, 11 Sep 2023 15:48:44 +0200 Message-ID: <20230911134709.119700346@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134650.286315610@linuxfoundation.org> References: <20230911134650.286315610@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 6.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Zimmermann commit 1ca8819320fd84e7d95b04e7668efc5f9fe9fa5c upstream. 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 Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-6-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/video/backlight/lv5207lp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/backlight/lv5207lp.c +++ b/drivers/video/backlight/lv5207lp.c @@ -67,7 +67,7 @@ static int lv5207lp_backlight_check_fb(s { 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 = {