[PATCH 2/2] atusb: Ignore interface 1 as it is used for DFU

Richard Sharpe realrichardsharpe at gmail.com
Wed Jun 22 23:41:21 EDT 2011


On Wed, Jun 22, 2011 at 9:42 PM, Stefan Schmidt
<stefan at datenfreihafen.org> wrote:
> ---
>  drivers/ieee802154/atusb.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ieee802154/atusb.c b/drivers/ieee802154/atusb.c
> index e906883..b6f9c89 100644
> --- a/drivers/ieee802154/atusb.c
> +++ b/drivers/ieee802154/atusb.c
> @@ -272,6 +272,14 @@ static int atusb_probe(struct usb_interface *interface,
>        atusb->udev = usb_get_dev(udev);
>        usb_set_intfdata(interface, atusb);
>
> +       /* Interface 1 is used for DFU ignore it in this driver to avoid
> +        * attaching to both interfaces */
> +        if (interface == udev->actconfig->interface[1]) {
> +                dev_info(&udev->dev,
> +                         "Ignoring interface 1 reserved for DFU\n");
> +                return -ENODEV;
> +        }
> +

This is a good point. We are probably only interested in one end-point
... I can't remember if I saw two end-points being detected, so it is
worth checking.

However, comments must follow the kernel style. If they span more than
one line, then

       /*
        * They should be in this style
        */

-- 
Regards,
Richard Sharpe




More information about the discussion mailing list


interactive