Re: [PATCH] hid: ACRUX game controller force feedback support

From: Dmitry Torokhov
Date: Thu Jul 15 2010 - 12:57:31 EST


Hi,

On Thu, Jul 15, 2010 at 10:49:56AM +0100, Jonathan Cameron wrote:
> > +
> > +static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > +{
> > + int ret;
> > +
> > + dev_dbg(&hdev->dev, "ACRUX HID hardware probe...");
> > +
> > + ret = hid_parse(hdev);
> > + if (ret) {
> > + dev_err(&hdev->dev, "parse failed\n");
> > + goto err;
> > + }
> > +
> > + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT& ~HID_CONNECT_FF);
> > + if (ret) {
> > + dev_err(&hdev->dev, "hw start failed\n");
> > + goto err;
> > + }
> > +
> > + axff_init(hdev);

Error handling for axff_init() too please.

> >
> > --- a/drivers/hid/Kconfig
> > +++ b/drivers/hid/Kconfig
> > @@ -68,6 +68,21 @@
> > ---help---
> > Support for A4 tech X5 and WOP-35 / Trust 450L mice.
> >
> > +config HID_ACRUX
> > + tristate "ACRUX support" if EMBEDDED
> > + depends on USB_HID
> > + default !EMBEDDED
> > + ---help---
> > + Say Y here if you have ACRUX game controllers.
> > +
> > +config ACRUX_FF
> > + bool "ACRUX force feedback support"
> > + depends on HID_ACRUX
> > + select INPUT_FF_MEMLESS
> > + ---help---
> > + Say Y here if you want to enable force feedback support for ACRUX
> > + game controllers.
> > +

Why 2 separate CONFIG options? I do not see any special handling except
for force feedback control itself; doesn't the device work with vanilla
kernel (sans FF of course)?

I also have a string suspicion the file is indented with 4 spaces, please
make sure it is indented with tabs.

And since it is HID device please make sure you copy Jiri Kosina
(CCed).

Thanks.

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/