[PATCH 2/2] atusb: Ignore interface 1 as it is used for DFU
Stefan Schmidt
stefan at datenfreihafen.org
Thu Jun 23 06:39:35 EDT 2011
Hello.
On Wed, 2011-06-22 at 23:41, Richard Sharpe wrote:
> 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.
Werner explained just explained it. Seems we will have two endpoints.
> However, comments must follow the kernel style. If they span more than
> one line, then
>
> /*
> * They should be in this style
> */
Will fix.
regards
Stefan Schmidt
More information about the discussion
mailing list