From nobody Mon Jun 8 23:58:46 2026 Received: from forward101d.mail.yandex.net (forward101d.mail.yandex.net [178.154.239.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E00C73DEAD6; Mon, 25 May 2026 09:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.212 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699727; cv=none; b=oiu5cLOGNlq8EzEcqLEQG0hCrhYIsz1qp98h1octFbYh5KKILYAopnxKkmuhrOtrGEqWXYpPsZ/gVjbzhW6AOaMC4E0UnVW8ibOdDkPre0jkZAh8smUD52fLWiARNNfIF9arw7ebLn+jINPGZDg9m7NCPiccu0XKQltIalT5uA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699727; c=relaxed/simple; bh=Di6ibABpARxJN4ZZwf5FABaY0H9wWb22U9iDf+YEuXE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J12e9hIdCoZzZEoqhbq1YPA6qFP2V17v79sCuqw5iOU3+RvPBt95Ovb8ob52IHcSyE7qfl0J/d6QQxubPNtHlQ0j3N4cpIEaTeDnELGM4grE+s38r7PserSzBEJJdGHu6yREkp3ZouaySqjirHkTpETF27qtEKCTCPMHUEYzzHg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=BgPt5ehw; arc=none smtp.client-ip=178.154.239.212 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="BgPt5ehw" Received: from mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1f87:0:640:a06a:0]) by forward101d.mail.yandex.net (Yandex) with ESMTPS id 673E7C006D; Mon, 25 May 2026 12:01:55 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (smtp) with ESMTPSA id m1TmE1aggiE0-151w8OVQ; Mon, 25 May 2026 12:01:54 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779699714; bh=2ZoiQpFopaWvdiWpWI/Ri4/uAAd0/TLSBl8SwvS4+XI=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=BgPt5ehw8friqH91cLDhN6ecmKXUFy3s4gAlJFcCKwUK5U8Z0yTrfcuci1AZ22ego zAbWg4nsKMyhZWpdrSLc0JDKqTaxFZZg1ZaZUjSOjHKCOx8x5TTs/L43k2gu4J0W7v poNAXwthn4Q2bTmEr0SjDSEe64PffU3+2d30L5C0= Authentication-Results: mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: error27@gmail.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH v3 1/4] staging: sm750fb: remove commented-out forward declarations Date: Mon, 25 May 2026 08:58:05 +0000 Message-ID: <20260525085808.171974-2-ahmet@sezginduran.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net> References: <20260525085808.171974-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The block at the top of sm750.c declares lynxfb_ops_write() and lynxfb_ops_read() inside a commented-out #ifdef __BIG_ENDIAN guard. Neither function is defined anywhere in the driver, so the block is dead. Remove it. Signed-off-by: Ahmet Sezgin Duran --- v3: No changes. v2: No changes. drivers/staging/sm750fb/sm750.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index 89c811e0806c..02db1418476b 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -8,15 +8,6 @@ #include "sm750_accel.h" #include "sm750_cursor.h" =20 -/* - * #ifdef __BIG_ENDIAN - * ssize_t lynxfb_ops_write(struct fb_info *info, const char __user *buf, - * size_t count, loff_t *ppos); - * ssize_t lynxfb_ops_read(struct fb_info *info, char __user *buf, - * size_t count, loff_t *ppos); - * #endif - */ - /* common var for all device */ static int g_hwcursor =3D 1; static int g_noaccel __ro_after_init; --=20 2.54.0 From nobody Mon Jun 8 23:58:46 2026 Received: from forward101a.mail.yandex.net (forward101a.mail.yandex.net [178.154.239.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07A863E317D; Mon, 25 May 2026 09:02:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699727; cv=none; b=C7KwC+vB8hDtstVu9/4hIsuEg163S4o1oMMrGYGpIV4PhJ9DsZ3F/xcgGVvoMrZlRGGH/sIlOXTa7QqU0pecVAzhMSTTMuzrsh/ujrEt623sEaYzUDztzlQFCwXV1NeuWQB+Lhb1SZserKl6v5TuhdRQ6ee1NNxxqNWk0OTmqZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699727; c=relaxed/simple; bh=MIj0J+AW53RCnzQ+5qg7U9y5+MAjictSABnZwTrdGBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D8TnvrLH9BoE7s9eYGr0XgRkK7cyaiVtX3NeyOpe2lW2ARoIdCJer5Iod3w3TT3LVeVNmGTjHDGGo2Uilndd6vQjE7w6UHPHnOayCHmFNx8+QfjogptTT8IZg+YCvD/C6hz9/6dm8e8Qu/OkZj0Jzdi0OzzbWVH3EG2ORtdOj1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=lWafVoJc; arc=none smtp.client-ip=178.154.239.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="lWafVoJc" Received: from mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1f87:0:640:a06a:0]) by forward101a.mail.yandex.net (Yandex) with ESMTPS id 21BB980E48; Mon, 25 May 2026 12:01:57 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (smtp) with ESMTPSA id m1TmE1aggiE0-bYE3IN2z; Mon, 25 May 2026 12:01:56 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779699716; bh=ENSooiXn9MHBTXc9FR2h8yvwp1L27CN5h8YNsJcPXi0=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=lWafVoJcpHXztLyxuw4qQVNhGy1fA7uee7cKcibV/x/+eHzf2/Sln5zly4hS71hsJ +2DexTvZM5pfefkZ1kwhhHXqU8wE9Yv6lvpZlC8z/Tu10vObeqiQRdeFw8wBeT6Of/ NZEMuRu2xZ2ElcIT8KdtNUEVA7qFIAZZAlI3wFfw= Authentication-Results: mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: error27@gmail.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH v3 2/4] staging: sm750fb: remove unnecessary initializations Date: Mon, 25 May 2026 08:58:06 +0000 Message-ID: <20260525085808.171974-3-ahmet@sezginduran.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net> References: <20260525085808.171974-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove two instances of `ret =3D 0` initializations since the variable is overridden unconditionally before being used. Signed-off-by: Ahmet Sezgin Duran --- v3: No changes. v2: No changes. drivers/staging/sm750fb/sm750.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index 02db1418476b..fff9c35ee7b0 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -343,7 +343,6 @@ static int lynxfb_ops_set_par(struct fb_info *info) if (!info) return -EINVAL; =20 - ret =3D 0; par =3D info->par; crtc =3D &par->crtc; output =3D &par->output; @@ -463,7 +462,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninf= o *var, if (!var->pixclock) return -EINVAL; =20 - ret =3D 0; par =3D info->par; crtc =3D &par->crtc; =20 --=20 2.54.0 From nobody Mon Jun 8 23:58:46 2026 Received: from forward102a.mail.yandex.net (forward102a.mail.yandex.net [178.154.239.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5A113E51D7; Mon, 25 May 2026 09:02:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.85 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699728; cv=none; b=VzkRm7f0mrm++XF0f4tMB6+s0rRvAfSLFTHtoEAgt9Wj1xkACaA+4meoVt5cNggL3IyKhTB7LXmPfl81L0Ru+Yq18eVGMosAXAPIB9go1l2F67UfqOcf+PdWX3FBC/NNdR37OBjYxKlTQ2YdRVSFbBI4FZNqk8WcgvF/Mc2XlQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699728; c=relaxed/simple; bh=m6L+WfQLukfJ22CKlgkSOtM5gPXeJyBJLhrq8GT0VB0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Si/WqFXbAa17eHrpdNBnwoorUgTA2HV8nHwm9OwDeAs0IIt2x8rhv+cpjqiZ74q2ofI4M7LVXATWLYOthBj5AFX1aHnUWrGQOEyYjiIhvM3AhrheZ4u9SQmD9/PD81EuWnZmqTAzHtLAXFNyv7Y8ECyNvYBcmOk3GjLfV7iP8cA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=o3IpaLG2; arc=none smtp.client-ip=178.154.239.85 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="o3IpaLG2" Received: from mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1f87:0:640:a06a:0]) by forward102a.mail.yandex.net (Yandex) with ESMTPS id AFD5CC00B4; Mon, 25 May 2026 12:01:58 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (smtp) with ESMTPSA id m1TmE1aggiE0-zAkZ6PMF; Mon, 25 May 2026 12:01:58 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779699718; bh=I8w+TyAHpYs0JHwiH+Wa6bU8NvFSAdJAPI4qLhqSZlc=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=o3IpaLG25YDSvWN7xJO6mQ9jDK/S6XIhP4VYuftrrCiUuzbB4V4rbHz3xH8jdhRh/ t/ADFxziA8KOuA/1nIgKPCTJggAO+YdQvLNk5xF1+pkX+QW0n0DStyW13Kt7ELNLgf bjc7uljHc84nG8Dqx3lncZVLQcdOJtFeA1O40CGA= Authentication-Results: mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: error27@gmail.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH v3 3/4] staging: sm750fb: remove unused struct fields Date: Mon, 25 May 2026 08:58:07 +0000 Message-ID: <20260525085808.171974-4-ahmet@sezginduran.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net> References: <20260525085808.171974-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove `void *priv` pointer field in following struct definitions: - `struct lynxfb_crtc` - `struct lynxfb_output` Verified that no other code references them. No functional changes. Signed-off-by: Ahmet Sezgin Duran --- v3: No changes. v2: No changes. drivers/staging/sm750fb/sm750.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm75= 0.h index d2c522e67f26..56d7e1fa4557 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -145,8 +145,6 @@ struct lynxfb_crtc { u16 ypanstep; u16 ywrapstep; =20 - void *priv; - /* cursor information */ struct lynx_cursor cursor; }; @@ -168,7 +166,6 @@ struct lynxfb_output { * *channel=3D1 means secondary channel * output->channel =3D=3D> &crtc->channel */ - void *priv; }; =20 struct lynxfb_par { --=20 2.54.0 From nobody Mon Jun 8 23:58:46 2026 Received: from forward102d.mail.yandex.net (forward102d.mail.yandex.net [178.154.239.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A91523E5A24; Mon, 25 May 2026 09:02:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.213 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699732; cv=none; b=jlGoACUm0ITyRqNF+CLlRhW2OqSDAn543qmQEGUI5bDIMRwSGnJNwZze1ii/KuP3l8fL5D1dXR4aFwcNIEofHz8kj/UvsaH422iK1MO7lHqSaiIav/q6fbsi7yVXcMLurV5T9VOrYzsqd9n+uF6n/IFIFpZetXjetwOUqdVxGYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779699732; c=relaxed/simple; bh=bKIOcjeTKtuzzrrQ+uACwiXgTYqZfklyisEbOyEJKf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n/bp5y0BqZvGOiLqBv0D+kBz9GGPkrvMgVMVGC56losYTdTAkwpW+DqcHsOpgCxKv2M1fIP7Gimxny141VTqlPPj8uYYCODhGhzHsg4qIRJKcA1r/06BBUDRb+uK/Tanh5g3iJN7qRQsrYqgkK1nfrEFjS5vZHAOTDpLG0bAnyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=e8qTzzZK; arc=none smtp.client-ip=178.154.239.213 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="e8qTzzZK" Received: from mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1f87:0:640:a06a:0]) by forward102d.mail.yandex.net (Yandex) with ESMTPS id DF19AC0131; Mon, 25 May 2026 12:02:00 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net (smtp) with ESMTPSA id m1TmE1aggiE0-NknztBpr; Mon, 25 May 2026 12:02:00 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779699720; bh=l/Y8MqxgP8cHThtgUHGreggx6yNi71NGQJ3DsYcQqNE=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=e8qTzzZK3F0iXmnZE+1oXULa6Rw3yzePt9QrXinLlpKyBuQiQSevSWu3jQXBatqgU Qc08NqQDq8M+59apTGppwcLGIL/aeN6u0xAgLt4MVVQVHURgCiSwDpE82NP7TprLkh WjheEQqEpibsoHE3OhimxmM1pRIJFOzPrTbmiQ5w= Authentication-Results: mail-nwsmtp-smtp-production-main-95.iva.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: error27@gmail.com, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH v3 4/4] staging: sm750fb: deduplicate fbinfo loop in suspend/resume Date: Mon, 25 May 2026 08:58:08 +0000 Message-ID: <20260525085808.171974-5-ahmet@sezginduran.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net> References: <20260525085808.171974-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" lynxfb_suspend() and lynxfb_resume() both walk sm750_dev->fbinfo[] via duplicated per-index blocks for fbinfo[0] and fbinfo[1]. Replace each pair of blocks with a for-loop bounded by sm750_dev->fb_count, the number of successfully registered framebuffers. No functional changes intended. Signed-off-by: Ahmet Sezgin Duran --- v3: Add braces around the multi-line if (info) body in the suspend loop per Dan Carpenter's review. Remove a stray blank line left behind in lynxfb_resume() after the dedup. Link: v2: No changes. drivers/staging/sm750fb/sm750.c | 36 +++++++++++++-------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index fff9c35ee7b0..1f6f92473c80 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -388,18 +388,19 @@ static int __maybe_unused lynxfb_suspend(struct devic= e *dev) { struct fb_info *info; struct sm750_dev *sm750_dev; + int i; =20 sm750_dev =3D dev_get_drvdata(dev); =20 console_lock(); - info =3D sm750_dev->fbinfo[0]; - if (info) - /* 1 means do suspend */ - fb_set_suspend(info, 1); - info =3D sm750_dev->fbinfo[1]; - if (info) - /* 1 means do suspend */ - fb_set_suspend(info, 1); + + for (i =3D 0; i < sm750_dev->fb_count; i++) { + info =3D sm750_dev->fbinfo[i]; + if (info) { + /* 1 means do suspend */ + fb_set_suspend(info, 1); + } + } =20 console_unlock(); return 0; @@ -414,6 +415,7 @@ static int __maybe_unused lynxfb_resume(struct device *= dev) struct lynxfb_par *par; struct lynxfb_crtc *crtc; struct lynx_cursor *cursor; + int i; =20 sm750_dev =3D pci_get_drvdata(pdev); =20 @@ -421,21 +423,11 @@ static int __maybe_unused lynxfb_resume(struct device= *dev) =20 hw_sm750_inithw(sm750_dev, pdev); =20 - info =3D sm750_dev->fbinfo[0]; - - if (info) { - par =3D info->par; - crtc =3D &par->crtc; - cursor =3D &crtc->cursor; - memset_io(cursor->vstart, 0x0, cursor->size); - memset_io(crtc->v_screen, 0x0, crtc->vidmem_size); - lynxfb_ops_set_par(info); - fb_set_suspend(info, 0); - } - - info =3D sm750_dev->fbinfo[1]; + for (i =3D 0; i < sm750_dev->fb_count; i++) { + info =3D sm750_dev->fbinfo[i]; + if (!info) + continue; =20 - if (info) { par =3D info->par; crtc =3D &par->crtc; cursor =3D &crtc->cursor; --=20 2.54.0