From patchwork Tue Mar 5 16:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 778144 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40E0312DD91; Tue, 5 Mar 2024 16:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709655878; cv=none; b=An+QEdFrSWdIgaHg+gx/aWDHrrpjwjRUmmjIdNqrebKZB5n9fuc+sjuXaASqWt24kKQPxLGBivGFV96DOxa45PREWd064v3eiJVav9GD/nlk1XJ7bEX1mjxpo5wvk4W6gRrzDE5KKCWM4OCnyNbQUmRD1T7iraUM2tTgp6SRM20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709655878; c=relaxed/simple; bh=xRj4kKc6f2k5uLI8oGBFudAYfK6dEXKOpLVGByVO3tw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IeFdt53aiqnD8wwC64ZCr/sgmPTuOjs2xxCxZUET+M7cb3ZOLk61j/WxYxbaY+vea/drfZv9JPzTAu41YUdwopJa26tuVyTE9J+XBvFvkqMbnRkO3z+88jDG5Q043W1aoPOYjb0Hr/RHy54Pl96c7TPM9Xfih5PUAGV10p9ydkA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W0PNgio3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=KsUTLYv2; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W0PNgio3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=KsUTLYv2; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W0PNgio3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="KsUTLYv2"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W0PNgio3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="KsUTLYv2" Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 596536B96B; Tue, 5 Mar 2024 16:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709655872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5EM1dsMS8ciY5XroJVXglx2pw68rH+KuHUZfHYNIwP4=; b=W0PNgio3QStK2Q0QP7XeJ4L7jA+7PQWWpPPNM3aibL76omc+KrS59bNzVX63GIz4K9/xvV pSI9s/eL+NbhcX6M+AvwVIzmoRofPY991r0bZyjAWmlZv4Z6rY4XywzEreBtfK7pvUUhQ4 MNd1ifdFb5QG1Tl1q2O9oD2sLpbN2jQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709655872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5EM1dsMS8ciY5XroJVXglx2pw68rH+KuHUZfHYNIwP4=; b=KsUTLYv2L4HqFmnFgxR9mGQ9HyydBYaKXbaF1OMTDQse0QUTiabUZxPsBap8v7ORuW78Pa bXFsWC6SAiuBHbBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709655872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5EM1dsMS8ciY5XroJVXglx2pw68rH+KuHUZfHYNIwP4=; b=W0PNgio3QStK2Q0QP7XeJ4L7jA+7PQWWpPPNM3aibL76omc+KrS59bNzVX63GIz4K9/xvV pSI9s/eL+NbhcX6M+AvwVIzmoRofPY991r0bZyjAWmlZv4Z6rY4XywzEreBtfK7pvUUhQ4 MNd1ifdFb5QG1Tl1q2O9oD2sLpbN2jQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709655872; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5EM1dsMS8ciY5XroJVXglx2pw68rH+KuHUZfHYNIwP4=; b=KsUTLYv2L4HqFmnFgxR9mGQ9HyydBYaKXbaF1OMTDQse0QUTiabUZxPsBap8v7ORuW78Pa bXFsWC6SAiuBHbBw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 03FCA13A5D; Tue, 5 Mar 2024 16:24:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id AFgwOz9H52WwYwAAn2gu4w (envelope-from ); Tue, 05 Mar 2024 16:24:31 +0000 From: Thomas Zimmermann To: lee@kernel.org, andy@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, robin@protonic.nl, javierm@redhat.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-input@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH v4 06/10] backlight/pwm-backlight: Remove struct backlight_ops.check_fb Date: Tue, 5 Mar 2024 17:22:39 +0100 Message-ID: <20240305162425.23845-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305162425.23845-1-tzimmermann@suse.de> References: <20240305162425.23845-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=W0PNgio3; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=KsUTLYv2 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.06 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:98:from]; TO_DN_SOME(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLmbat3p9xsccqh5oowmzmthut)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,protonic.nl,redhat.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.05)[59.53%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_DKIM_ARC_DNSWL_HI(-1.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[13]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[linaro.org:email,suse.de:dkim,suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_IN_DNSWL_HI(-0.50)[2a07:de40:b281:104:10:150:64:98:from]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -3.06 X-Rspamd-Queue-Id: 596536B96B X-Spam-Flag: NO The internal check_fb callback from struct pwm_bl_data is never implemented. The driver's implementation of check_fb always returns true, which is the backlight core's default if no implementation has been set. So remove the code from the driver. v2: * reword commit message Signed-off-by: Thomas Zimmermann Cc: "Uwe Kleine-König" Acked-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Reviewed-by: Javier Martinez Canillas --- drivers/video/backlight/pwm_bl.c | 12 ------------ include/linux/pwm_backlight.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index ffcebf6aa76a9..61d30bc98eea5 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ struct pwm_bl_data { int brightness); void (*notify_after)(struct device *, int brightness); - int (*check_fb)(struct device *, struct fb_info *); void (*exit)(struct device *); }; @@ -129,17 +127,8 @@ static int pwm_backlight_update_status(struct backlight_device *bl) return 0; } -static int pwm_backlight_check_fb(struct backlight_device *bl, - struct fb_info *info) -{ - struct pwm_bl_data *pb = bl_get_data(bl); - - return !pb->check_fb || pb->check_fb(pb->dev, info); -} - static const struct backlight_ops pwm_backlight_ops = { .update_status = pwm_backlight_update_status, - .check_fb = pwm_backlight_check_fb, }; #ifdef CONFIG_OF @@ -482,7 +471,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->notify = data->notify; pb->notify_after = data->notify_after; - pb->check_fb = data->check_fb; pb->exit = data->exit; pb->dev = &pdev->dev; pb->enabled = false; diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index cdd2ac366bc72..0bf80e98d5b40 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h @@ -19,7 +19,6 @@ struct platform_pwm_backlight_data { int (*notify)(struct device *dev, int brightness); void (*notify_after)(struct device *dev, int brightness); void (*exit)(struct device *dev); - int (*check_fb)(struct device *dev, struct fb_info *info); }; #endif