diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2012-04-23 06:07:07 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-05-01 06:54:55 -0400 |
commit | 8215d557e5f3a70e50e07c857d35c250fee62a73 (patch) | |
tree | 1ba7ffa5bddacacc9bff64a049e0ca091d43b65d /net | |
parent | 4fa3a5837b8427faab9b064b1948795eb77b9f8d (diff) |
HID: Create a common generic driver
Move the hid drivers of the bus drivers to a common generic hid
driver, and make it a proper module. This ought to simplify device
handling moving forward.
Cc: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hidp/core.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index b6fa982e4031..2c20d765b394 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -1195,41 +1195,16 @@ int hidp_get_conninfo(struct hidp_conninfo *ci) | |||
1195 | return err; | 1195 | return err; |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | static const struct hid_device_id hidp_table[] = { | ||
1199 | { HID_DEVICE(BUS_BLUETOOTH, HID_GROUP_GENERIC, HID_ANY_ID, HID_ANY_ID) }, | ||
1200 | { } | ||
1201 | }; | ||
1202 | |||
1203 | static struct hid_driver hidp_driver = { | ||
1204 | .name = "generic-bluetooth", | ||
1205 | .id_table = hidp_table, | ||
1206 | }; | ||
1207 | |||
1208 | static int __init hidp_init(void) | 1198 | static int __init hidp_init(void) |
1209 | { | 1199 | { |
1210 | int ret; | ||
1211 | |||
1212 | BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); | 1200 | BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); |
1213 | 1201 | ||
1214 | ret = hid_register_driver(&hidp_driver); | 1202 | return hidp_init_sockets(); |
1215 | if (ret) | ||
1216 | goto err; | ||
1217 | |||
1218 | ret = hidp_init_sockets(); | ||
1219 | if (ret) | ||
1220 | goto err_drv; | ||
1221 | |||
1222 | return 0; | ||
1223 | err_drv: | ||
1224 | hid_unregister_driver(&hidp_driver); | ||
1225 | err: | ||
1226 | return ret; | ||
1227 | } | 1203 | } |
1228 | 1204 | ||
1229 | static void __exit hidp_exit(void) | 1205 | static void __exit hidp_exit(void) |
1230 | { | 1206 | { |
1231 | hidp_cleanup_sockets(); | 1207 | hidp_cleanup_sockets(); |
1232 | hid_unregister_driver(&hidp_driver); | ||
1233 | } | 1208 | } |
1234 | 1209 | ||
1235 | module_init(hidp_init); | 1210 | module_init(hidp_init); |