[PATCH 5/5] qt1070: init default key code first
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Jan 14 11:36:12 EST 2013
So the key code provided by platform_data are not overwrited
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at 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
More information about the barebox
mailing list