From: Viresh Kumar <viresh.kumar@linaro.org>
To: tomi.valkeinen@ti.com
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fbdev: pxafb: clampval() doesn't update the variable
Date: Wed, 01 Jun 2016 08:49:50 +0000 [thread overview]
Message-ID: <eddfe3528f38f8c67b15fea81758fe1aa44904a2.1464770175.git.viresh.kumar@linaro.org> (raw)
clampval() returns the clamped value instead of updating the variable
itself. And the driver is using it in a wrong way. Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/video/fbdev/pxafb.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 2c0487f4f805..b1197980b9b1 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -417,12 +417,12 @@ static int pxafb_adjust_timing(struct pxafb_info *fbi,
var->yres = max_t(int, var->yres, MIN_YRES);
if (!(fbi->lccr0 & LCCR0_LCDT)) {
- clamp_val(var->hsync_len, 1, 64);
- clamp_val(var->vsync_len, 1, 64);
- clamp_val(var->left_margin, 1, 255);
- clamp_val(var->right_margin, 1, 255);
- clamp_val(var->upper_margin, 1, 255);
- clamp_val(var->lower_margin, 1, 255);
+ var->hsync_len = clamp_val(var->hsync_len, 1, 64);
+ var->vsync_len = clamp_val(var->vsync_len, 1, 64);
+ var->left_margin = clamp_val(var->left_margin, 1, 255);
+ var->right_margin = clamp_val(var->right_margin, 1, 255);
+ var->upper_margin = clamp_val(var->upper_margin, 1, 255);
+ var->lower_margin = clamp_val(var->lower_margin, 1, 255);
}
/* make sure each line is aligned on word boundary */
--
2.7.1.410.g6faf27b
reply other threads:[~2016-06-01 8:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=eddfe3528f38f8c67b15fea81758fe1aa44904a2.1464770175.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/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).