diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-04 09:22:54 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-04 09:22:54 -0700 |
| commit | a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (patch) | |
| tree | 8960e571a398b5d32e72bdb9c89ce965daa870ab /drivers/input/keyboard/gpio_keys.c | |
| parent | f5308d1b83eba20e69df5e0926ba7257c8dd9074 (diff) | |
| parent | 08d6ac9ee5fedd82040bc878705981b67a116a3f (diff) | |
| download | talos-op-linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.tar.gz talos-op-linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.zip | |
Merge branch 'next' into for-linus
Prepare input updates for 4.14 merge window.
Diffstat (limited to 'drivers/input/keyboard/gpio_keys.c')
| -rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index a047b9af8369..e9f0ebf3267a 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -353,7 +353,7 @@ static struct attribute *gpio_keys_attrs[] = { NULL, }; -static struct attribute_group gpio_keys_attr_group = { +static const struct attribute_group gpio_keys_attr_group = { .attrs = gpio_keys_attrs, }; @@ -827,7 +827,7 @@ static int gpio_keys_probe(struct platform_device *pdev) fwnode_handle_put(child); - error = sysfs_create_group(&dev->kobj, &gpio_keys_attr_group); + error = devm_device_add_group(dev, &gpio_keys_attr_group); if (error) { dev_err(dev, "Unable to export keys/switches, error: %d\n", error); @@ -838,23 +838,12 @@ static int gpio_keys_probe(struct platform_device *pdev) if (error) { dev_err(dev, "Unable to register input device, error: %d\n", error); - goto err_remove_group; + return error; } device_init_wakeup(dev, wakeup); return 0; - -err_remove_group: - sysfs_remove_group(&dev->kobj, &gpio_keys_attr_group); - return error; -} - -static int gpio_keys_remove(struct platform_device *pdev) -{ - sysfs_remove_group(&pdev->dev.kobj, &gpio_keys_attr_group); - - return 0; } static int __maybe_unused gpio_keys_suspend(struct device *dev) @@ -912,7 +901,6 @@ static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume); static struct platform_driver gpio_keys_device_driver = { .probe = gpio_keys_probe, - .remove = gpio_keys_remove, .driver = { .name = "gpio-keys", .pm = &gpio_keys_pm_ops, |

