From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 3/3] sm501fb: suspend and resume fb if it exists
Date: Sat, 4 Nov 2017 21:24:21 +0000 [thread overview]
Message-ID: <1509830661-7384-3-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1509830661-7384-1-git-send-email-sudipm.mukherjee@gmail.com>
There are cases when panel and crt both are not defined and only one of
them is defined and initialized. In such cases, suspend or resume it
only if it is defined.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
drivers/video/fbdev/sm501fb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index 577a483..49233c1 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -2101,6 +2101,9 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info,
struct fb_info *fbi = info->fb[head];
struct sm501fb_par *par = fbi->par;
+ if (!fbi)
+ return 0;
+
if (par->screen.size == 0)
return 0;
@@ -2148,6 +2151,9 @@ static void sm501fb_resume_fb(struct sm501fb_info *info,
struct fb_info *fbi = info->fb[head];
struct sm501fb_par *par = fbi->par;
+ if (!fbi)
+ return;
+
if (par->screen.size == 0)
return;
--
2.1.4
next prev parent reply other threads:[~2017-11-04 21:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171104212429epcas1p428cc1efb505e9c78dda41e603c400b7b@epcas1p4.samsung.com>
2017-11-04 21:24 ` [PATCH 1/3] sm501fb: deallocate colormap only if allocated Sudip Mukherjee
2017-11-04 21:24 ` [PATCH 2/3] sm501fb: unregister framebuffer only if registered Sudip Mukherjee
2017-11-09 15:10 ` Bartlomiej Zolnierkiewicz
2017-11-04 21:24 ` Sudip Mukherjee [this message]
2017-11-09 15:11 ` [PATCH 3/3] sm501fb: suspend and resume fb if it exists Bartlomiej Zolnierkiewicz
2017-11-09 15:10 ` [PATCH 1/3] sm501fb: deallocate colormap only if allocated Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509830661-7384-3-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).