diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-04 13:31:16 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-08-25 11:37:21 +0200 |
commit | 9f4441fcbb7219b4e6ea4554f404209a433d4f52 (patch) | |
tree | 5e4971bb137c34123067f3eafe1480a8dc722a67 /drivers/hid/hid-google-hammer.c | |
parent | 8d9420ca9bd9bceddcfab3d0263d6a8e073396fe (diff) | |
download | linux-9f4441fcbb7219b4e6ea4554f404209a433d4f52.tar.gz linux-9f4441fcbb7219b4e6ea4554f404209a433d4f52.tar.bz2 linux-9f4441fcbb7219b4e6ea4554f404209a433d4f52.zip |
HID: vivaldi: convert to use dev_groups
There is no need for a driver to individually add/create device groups,
the driver core will do it automatically for you. Convert the
hid-vivaldi core driver to use the dev_groups pointer instead of
manually calling the driver core to create the group and have it be
cleaned up later on by the devm core.
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-google-hammer.c')
-rw-r--r-- | drivers/hid/hid-google-hammer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c index ff40f1e55c21..7ae5f27df54d 100644 --- a/drivers/hid/hid-google-hammer.c +++ b/drivers/hid/hid-google-hammer.c @@ -608,9 +608,11 @@ static struct hid_driver hammer_driver = { .probe = hammer_probe, .remove = hammer_remove, .feature_mapping = vivaldi_feature_mapping, - .input_configured = vivaldi_input_configured, .input_mapping = hammer_input_mapping, .event = hammer_event, + .driver = { + .dev_groups = vivaldi_attribute_groups, + }, }; static int __init hammer_init(void) |