diff options
-rw-r--r-- | drivers/input/keyboard/gpio_keys_polled.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index c4087be0c2e0..033655ab5ed0 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c | |||
@@ -168,6 +168,8 @@ gpio_keys_polled_get_devtree_pdata(struct device *dev) | |||
168 | pdata->rep = device_property_present(dev, "autorepeat"); | 168 | pdata->rep = device_property_present(dev, "autorepeat"); |
169 | device_property_read_u32(dev, "poll-interval", &pdata->poll_interval); | 169 | device_property_read_u32(dev, "poll-interval", &pdata->poll_interval); |
170 | 170 | ||
171 | device_property_read_string(dev, "label", &pdata->name); | ||
172 | |||
171 | device_for_each_child_node(dev, child) { | 173 | device_for_each_child_node(dev, child) { |
172 | if (fwnode_property_read_u32(child, "linux,code", | 174 | if (fwnode_property_read_u32(child, "linux,code", |
173 | &button->code)) { | 175 | &button->code)) { |
@@ -270,7 +272,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) | |||
270 | 272 | ||
271 | input = poll_dev->input; | 273 | input = poll_dev->input; |
272 | 274 | ||
273 | input->name = pdev->name; | 275 | input->name = pdata->name ?: pdev->name; |
274 | input->phys = DRV_NAME"/input0"; | 276 | input->phys = DRV_NAME"/input0"; |
275 | 277 | ||
276 | input->id.bustype = BUS_HOST; | 278 | input->id.bustype = BUS_HOST; |