diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-22 13:00:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-22 13:00:15 +0300 |
commit | 1af824f085e813e06548212b18bbc788b16f60e6 (patch) | |
tree | 7e4bea76e0780330e27d660633ba514dc02e2fbf /drivers/input/misc/axp20x-pek.c | |
parent | d8bcf4db9244e2b85597c680f4e1c3a837b067fe (diff) | |
parent | 072a7852338af900c302490474939e089f4bd4c4 (diff) | |
download | linux-1af824f085e813e06548212b18bbc788b16f60e6.tar.xz |
Merge branch 'bind_unbind' into driver-core-next
This merges the bind_unbind driver core feature into the
driver-core-next branch. bind_unbind is a branch so that others can
pull and work off of it safely.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/misc/axp20x-pek.c')
-rw-r--r-- | drivers/input/misc/axp20x-pek.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index 38c79ebff033..cfeb0e943de6 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c @@ -182,13 +182,6 @@ static irqreturn_t axp20x_pek_irq(int irq, void *pwr) return IRQ_HANDLED; } -static void axp20x_remove_sysfs_group(void *_data) -{ - struct device *dev = _data; - - sysfs_remove_group(&dev->kobj, &axp20x_attribute_group); -} - static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek, struct platform_device *pdev) { @@ -313,22 +306,13 @@ static int axp20x_pek_probe(struct platform_device *pdev) return error; } - error = sysfs_create_group(&pdev->dev.kobj, &axp20x_attribute_group); + error = devm_device_add_group(&pdev->dev, &axp20x_attribute_group); if (error) { dev_err(&pdev->dev, "Failed to create sysfs attributes: %d\n", error); return error; } - error = devm_add_action(&pdev->dev, - axp20x_remove_sysfs_group, &pdev->dev); - if (error) { - axp20x_remove_sysfs_group(&pdev->dev); - dev_err(&pdev->dev, "Failed to add sysfs cleanup action: %d\n", - error); - return error; - } - platform_set_drvdata(pdev, axp20x_pek); return 0; |