Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2459006rdb; Wed, 21 Feb 2024 08:15:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUWzOKyVkv1OBEREFrbtk5yXoEDQyu/lHJpvuJXUqPJ0gBhJ2pnNdwMBjnJipP8VLuFPprGApPcUOVcgfe6oJ/+2Dzt56k9IJN/7bHxLg== X-Google-Smtp-Source: AGHT+IEg3pH50EbuzX4A7dar6crw1HX8WWIKJSpxZnm5sBPQeJKC5SbWeLpt/xJ7hyydKWbP0a3K X-Received: by 2002:a54:4402:0:b0:3c1:34d9:87c4 with SMTP id k2-20020a544402000000b003c134d987c4mr14748109oiw.59.1708532108047; Wed, 21 Feb 2024 08:15:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708532108; cv=pass; d=google.com; s=arc-20160816; b=XakVp1/vwTsVmGBmVp0SE5i8nmk5+Jamg4T464bUXmGjHn2WdYcXs17ZUt6JTlZSdO YsYaGsREEAKt3Ruub4FMy3fRT9g3B+rz8KLjdvds3/1xvLK7VZlI0HUlDuL5687ZIt+y w1xZw+SOohQaywj81txhssoMBIOrJ57ak4VmbudgWXwLXYngtfTSGkjkeX5RmuPuTwgs zTadFbybL1GX84K4jUwue1FZXRyjzLqUYs+DAgnNTc0NENV2Ze+rFofPscOSKlxFspk/ dyJXF0r2BL/APuPskLzkGSe8iToqCIDEj4o2uwFDoppiGFBKtWv5HaweA6MoH5wiK8Tk GXqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=zwvLdVavaANAAb7PsK+LZQ7J3MrqOvMVYfJ27tFg0NU=; fh=y4Lq7OLaQZ0RWbFSmharKcIgYrs2tJIVzUxbKzQ4COk=; b=KbOJtp/LraESNIAjaCYBZgf5TXbzfFoLnlTRmhxKmbXZrIHfwEJ94hUO22FrFUWVRf 0tJGzqry2vQKXH2k62G8BI0YTr8s/SH3UhxIsRe8YXzIAlpOLKO2SzH02LrfXyu8Ea4u 1xkVGa+mBVubt3NMA00qYExCeCURNfJJSHDpMz6raAKecKkVCkP67Zd0/kEwJA4bd2Uk Nu2/JfJrs/ufeoOmxzq3RYh2vFtgwyWRamRy28LGhcTgWCwYs1cHiGbEcbyui7GP6UT8 qQgH3w0MBA3yJcQaC7DVxZb3msr52CFSYvA7QEc9yJIBtBNy6Zzj8Kp/tyDYC0jg8/yy /Z8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-75083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c2-20020ac87dc2000000b0042a2aef2a52si11967240qte.439.2024.02.21.08.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 08:15:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-75083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B9A581C2345A for ; Wed, 21 Feb 2024 16:15:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D91D482869; Wed, 21 Feb 2024 16:14:40 +0000 (UTC) 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 31C4081727; Wed, 21 Feb 2024 16:14:37 +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=1708532080; cv=none; b=iGHr7my6LY5rJsmD3IZ/jHGZzF0cCJksogYqMqfzZpWgp1YQ8utrzOBMvho7ch1tTv8WVr+tSkSNVvsqHVJLRXXAzXHDUMJZ+PnIlHEk96lXm5jGdG/hOdN9KPvO5frWO2igzMBh1/fdb9Wk+ilaJ9TINXt33yQDCg83BmaDKkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708532080; c=relaxed/simple; bh=yYqzYtJAPQQnX5BXLRxsoSQ35D1qJ08sTZqnz8fPL24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iR392pI0Nhve6ZuA6kxsIaXDndaNDNST0MBm2ihXIk6X9a8h8lsgWoCsn9P8xf8+B/zlsJGWGS7oFS0E9cuOrP3k6xgNmE5hR6x0/Zi2KdacmdziTdRku/YowoCkFfFh1AtkN/F11Xba11xxuBbj9ITx3+A6checMDleMkxUjSE= 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; 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 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 56AE8220C9; Wed, 21 Feb 2024 16:14:35 +0000 (UTC) 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 ABB70139D1; Wed, 21 Feb 2024 16:14:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id qF+xKGoh1mVrYwAAn2gu4w (envelope-from ); Wed, 21 Feb 2024 16:14:34 +0000 From: Thomas Zimmermann To: arnd@arndb.de, javierm@redhat.com, deller@gmx.de, suijingfeng@loongson.cn Cc: linux-arch@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, sparclinux@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-m68k@lists.linux-m68k.org, loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , "James E.J. Bottomley" , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH 2/3] arch: Remove struct fb_info from video helpers Date: Wed, 21 Feb 2024 17:05:25 +0100 Message-ID: <20240221161431.8245-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240221161431.8245-1-tzimmermann@suse.de> References: <20240221161431.8245-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 56AE8220C9 X-Spam-Flag: NO The per-architecture video helpers do not depend on struct fb_info or anything else from fbdev. Remove it from the interface and replace fb_is_primary_device() with video_is_primary_device(). The new helper is similar in functionality, but can operate on non-fbdev devices. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: "David S. Miller" Cc: Andreas Larsson Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" --- arch/parisc/include/asm/fb.h | 8 +++++--- arch/parisc/video/fbdev.c | 9 +++++---- arch/sparc/include/asm/fb.h | 7 ++++--- arch/sparc/video/fbdev.c | 17 ++++++++--------- arch/x86/include/asm/fb.h | 8 +++++--- arch/x86/video/fbdev.c | 18 +++++++----------- drivers/video/fbdev/core/fbcon.c | 2 +- include/asm-generic/fb.h | 11 ++++++----- 8 files changed, 41 insertions(+), 39 deletions(-) diff --git a/arch/parisc/include/asm/fb.h b/arch/parisc/include/asm/fb.h index 658a8a7dc5312..ed2a195a3e762 100644 --- a/arch/parisc/include/asm/fb.h +++ b/arch/parisc/include/asm/fb.h @@ -2,11 +2,13 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -struct fb_info; +#include + +struct device; #if defined(CONFIG_STI_CORE) -int fb_is_primary_device(struct fb_info *info); -#define fb_is_primary_device fb_is_primary_device +bool video_is_primary_device(struct device *dev); +#define video_is_primary_device video_is_primary_device #endif #include diff --git a/arch/parisc/video/fbdev.c b/arch/parisc/video/fbdev.c index e4f8ac99fc9e0..540fa0c919d59 100644 --- a/arch/parisc/video/fbdev.c +++ b/arch/parisc/video/fbdev.c @@ -5,12 +5,13 @@ * Copyright (C) 2001-2002 Thomas Bogendoerfer */ -#include #include #include