mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Barebox List <barebox@lists.infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 6/6] atmel_lcdfb: fix so the correct guard_time is used
Date: Wed, 19 Jul 2017 23:21:04 +0200	[thread overview]
Message-ID: <20170719212104.2613-6-sam@ravnborg.org> (raw)
In-Reply-To: <20170719212013.GA1675@ravnborg.org>

guard_time is set in platform data but was never copied
to atmel_lcdfb_info thus a guard_time of 0 have always been used.

This issue was found during code inspection and no know
bugs is fixed by this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/video/atmel_lcdfb.c      | 2 +-
 drivers/video/atmel_lcdfb_core.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 20204c1dd..a0e41d10c 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -85,7 +85,7 @@ static void atmel_lcdfb_start(struct atmel_lcdfb_info *sinfo)
 
 	lcdc_writel(sinfo, ATMEL_LCDC_DMACON, pdata->default_dmacon);
 	lcdc_writel(sinfo, ATMEL_LCDC_PWRCON,
-		(pdata->guard_time << ATMEL_LCDC_GUARDT_OFFSET)
+		(sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET)
 		| ATMEL_LCDC_PWR);
 }
 
diff --git a/drivers/video/atmel_lcdfb_core.c b/drivers/video/atmel_lcdfb_core.c
index 555799ea4..f6c5d7c05 100644
--- a/drivers/video/atmel_lcdfb_core.c
+++ b/drivers/video/atmel_lcdfb_core.c
@@ -258,6 +258,7 @@ int atmel_lcdc_register(struct device_d *dev, struct atmel_lcdfb_devdata *data)
 
 	sinfo = xzalloc(sizeof(*sinfo));
 	sinfo->pdata = pdata;
+	sinfo->guard_time = pdata->guard_time;
 	iores = dev_request_mem_resource(dev, 0);
 	if (IS_ERR(iores))
 		return PTR_ERR(iores);
-- 
2.12.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-07-19 21:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 21:20 [PATCH 0/6] assorted fixes, mainly at91 related Sam Ravnborg
2017-07-19 21:20 ` [PATCH 1/6] arm: at91 bootstrap: declare local function static Sam Ravnborg
2017-07-19 21:21 ` [PATCH 2/6] macb: fix clock probing with DT Sam Ravnborg
2017-07-19 21:21 ` [PATCH 3/6] clk: at91: fix clk-main Sam Ravnborg
2017-07-19 21:21 ` [PATCH 4/6] pinctrl: at91: move initcalls to postcore_initcall Sam Ravnborg
2017-07-19 21:21 ` [PATCH 5/6] mci: atmel_mci: fix devinfo DEV with OF enabled Sam Ravnborg
2017-07-19 21:21 ` Sam Ravnborg [this message]
2017-07-20 13:05 ` [PATCH 0/6] assorted fixes, mainly at91 related Lucas Stach

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=20170719212104.2613-6-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=barebox@lists.infradead.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