diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-13 20:25:38 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-01-15 00:26:19 +0800 |
commit | 97d4ca970a591b0461df776b10206db33ee79beb (patch) | |
tree | 71f610ed5e8f5437bd5b41439adddad8477c0664 /drivers/input/qt1070.c | |
parent | 8e92f54ad4e9a241e700b2efc91d6d9c62628484 (diff) | |
download | barebox-97d4ca970a591b0461df776b10206db33ee79beb.tar.gz barebox-97d4ca970a591b0461df776b10206db33ee79beb.tar.xz |
qt1070: init default key code first
So the key code provided by platform_data are not overwrited
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/input/qt1070.c')
-rw-r--r-- | drivers/input/qt1070.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/qt1070.c b/drivers/input/qt1070.c index c66189e9c7..ebe2b81f57 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); |