mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] qt1070: init default key code first
Date: Mon, 14 Jan 2013 17:36:12 +0100	[thread overview]
Message-ID: <1358181372-24547-5-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1358181372-24547-1-git-send-email-plagnioj@jcrosoft.com>

So the key code provided by platform_data are not overwrited

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/input/qt1070.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/qt1070.c b/drivers/input/qt1070.c
index c66189e..ebe2b81 100644
--- a/drivers/input/qt1070.c
+++ b/drivers/input/qt1070.c
@@ -244,6 +244,8 @@ static int qt1070_probe(struct device_d *dev)
 	sprintf(buf, "0x%x", chip_id);
 	dev_add_param_fixed(dev, "chip_ip", buf);
 
+	memcpy(data->code, default_code, sizeof(int) * ARRAY_SIZE(default_code));
+
 	ret = qt1070_pdata_init(dev, data);
 	if (ret) {
 		dev_err(dev, "can not get pdata (%d)\n", ret);
@@ -258,7 +260,6 @@ static int qt1070_probe(struct device_d *dev)
 	}
 	data->start = get_time_ns();
 
-	memcpy(data->code, default_code, sizeof(int) * ARRAY_SIZE(default_code));
 
 	data->fifo_size = 50;
 	data->recv_fifo = kfifo_alloc(data->fifo_size);
-- 
1.7.10.4


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

  parent reply	other threads:[~2013-01-14 16:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 16:32 [PATCH 0/5] some fixes Jean-Christophe PLAGNIOL-VILLARD
2013-01-14 16:36 ` [RESEND PATCH 1/5] w1: gpio: use int for gpio Jean-Christophe PLAGNIOL-VILLARD
2013-01-14 16:36   ` [RESEND PATCH 2/5] at91: sam9x5ek: use -EINVAL for invalid gpio on 1-wire Jean-Christophe PLAGNIOL-VILLARD
2013-01-14 16:36   ` [PATCH 3/5] at91sam9g45: fix i2c typos Jean-Christophe PLAGNIOL-VILLARD
2013-01-14 16:36   ` [PATCH 4/5] atmel_spi: fix spi cs gpio request loop Jean-Christophe PLAGNIOL-VILLARD
2013-01-14 16:36   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-15 14:33 ` [PATCH 0/5] some fixes Sascha Hauer

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=1358181372-24547-5-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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