diff options
author | Beomho Seo <beomho.seo@samsung.com> | 2014-11-27 11:36:33 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-27 04:44:27 -0800 |
commit | ff43841d1fb266469f73ca7dc6d7a51d4b18bbbe (patch) | |
tree | ffb53b6b545a227bbbc6e5b3b6129f0faa2f02de /drivers | |
parent | 06975230d3a600d1e3a21747aef004d6583decc1 (diff) | |
download | linux-3.10-ff43841d1fb266469f73ca7dc6d7a51d4b18bbbe.tar.gz linux-3.10-ff43841d1fb266469f73ca7dc6d7a51d4b18bbbe.tar.bz2 linux-3.10-ff43841d1fb266469f73ca7dc6d7a51d4b18bbbe.zip |
input: keyboard: mcs_touchkey: use strcpy for assign device name
This patch use strcpy() for assign input device name.
Change-Id: I2d363de2b0fe88d771ed71a861f7880a73dc6dac
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/mcs_touchkey.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c index 86f55b67749..73177537aad 100644 --- a/drivers/input/keyboard/mcs_touchkey.c +++ b/drivers/input/keyboard/mcs_touchkey.c @@ -53,6 +53,7 @@ struct mcs_touchkey_data { struct i2c_client *client; struct input_dev *input_dev; struct mcs_touchkey_chip chip; + char name[64]; unsigned int key_code; unsigned int key_val; unsigned short keycodes[]; @@ -208,7 +209,9 @@ static int mcs_touchkey_probe(struct i2c_client *client, } dev_info(&client->dev, "Firmware version: %d\n", fw_ver); - input_dev->name = "MELFAS MCS Touchkey"; + strlcpy(data->name, "MELFAS MCS Touchkey", sizeof(data->name)); + + input_dev->name = data->name; input_dev->id.bustype = BUS_I2C; input_dev->dev.parent = &client->dev; input_dev->evbit[0] = BIT_MASK(EV_KEY); |