From 97d4ca970a591b0461df776b10206db33ee79beb Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 13 Jan 2013 20:25:38 +0800 Subject: qt1070: init default key code first So the key code provided by platform_data are not overwrited Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/input/qt1070.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/input/qt1070.c') 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); -- cgit v1.2.3