diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-07-25 01:51:18 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-07-25 01:51:18 +0200 |
commit | 53a7ff8fb785839b87f950fd85433d9c662fac89 (patch) | |
tree | 119840a23e5226d3f258e2309b4ef1d328535dd2 /drivers/input/rmi4/rmi_f01.c | |
parent | Input: sur40 - skip all blobs that are not touches (diff) | |
parent | Input: axp20x-pek - switch to using devm_device_add_group() (diff) | |
download | linux-53a7ff8fb785839b87f950fd85433d9c662fac89.tar.xz linux-53a7ff8fb785839b87f950fd85433d9c662fac89.zip |
Merge branch 'bind_unbind' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into next
This brings in devm_device_add_group() and friends so that we can create
driver-specific device attributes as managed resources.
Diffstat (limited to 'drivers/input/rmi4/rmi_f01.c')
-rw-r--r-- | drivers/input/rmi4/rmi_f01.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index aa1aabfdbe7c..ae966e333a2f 100644 --- a/drivers/input/rmi4/rmi_f01.c +++ b/drivers/input/rmi4/rmi_f01.c @@ -570,18 +570,14 @@ static int rmi_f01_probe(struct rmi_function *fn) dev_set_drvdata(&fn->dev, f01); - error = sysfs_create_group(&fn->rmi_dev->dev.kobj, &rmi_f01_attr_group); + error = devm_device_add_group(&fn->rmi_dev->dev, &rmi_f01_attr_group); if (error) - dev_warn(&fn->dev, "Failed to create sysfs group: %d\n", error); + dev_warn(&fn->dev, + "Failed to create attribute group: %d\n", error); return 0; } -static void rmi_f01_remove(struct rmi_function *fn) -{ - sysfs_remove_group(&fn->rmi_dev->dev.kobj, &rmi_f01_attr_group); -} - static int rmi_f01_config(struct rmi_function *fn) { struct f01_data *f01 = dev_get_drvdata(&fn->dev); @@ -721,7 +717,6 @@ struct rmi_function_handler rmi_f01_handler = { }, .func = 0x01, .probe = rmi_f01_probe, - .remove = rmi_f01_remove, .config = rmi_f01_config, .attention = rmi_f01_attention, .suspend = rmi_f01_suspend, |