Messages in this thread | | | Subject | Re: [PATCH 2/9] HID: make a bus from hid code | From | Marcel Holtmann <> | Date | Mon, 12 May 2008 01:05:58 +0200 |
| |
Hi Jiri,
> Make a bus from hid core. This is the first step for converting all the > quirks and separate almost-drivers into real drivers attached to this bus. > > It's implemented to change behaviour in very tiny manner, so that no driver > needs to be changed this time. > > Also add generic drivers for both usb and bt into usbhid or hidp > respectively which will bind all non-blacklisted device. Those blacklisted > will be either grabbed by special drivers or by nobody if they are broken at > the very rude base. > > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
<snip>
> +static const struct hid_device_id hid_generic_bt_ids[] = { > + { HID_BT_DEVICE(HID_ANY_ID, HID_ANY_ID) }, > + { } > +};
please rename it to hidp_table[].
Also can we do HID_BLUETOOTH_DEVICE() here. Since the bus constant is called BUS_BLUETOOTH. Please don't shortcut it.
> +static struct hid_driver hid_generic_bt = { > + .name = "hid-generic-bt", > + .id_table = hid_generic_bt_ids, > +};
And this one to hidp_driver instead of hid_generic_bt.
Also the name "hid-generic-bt" is not okay. Call it "hidp" since that is the driver name. An alternative would be "hid-bluetooth". I don't like the "generic" part and we never used the shortcut "bt" in any sysfs visible file.
Do we really need the "hid-" prefix here. Since it is on the HID bus anyway, we can leave the magic details to the driver model and simply call it "bluetooth".
Other than that:
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
| |