Re: [PATCH 2.6.14.2] Updated itmtouch kernel usb input driver (1/1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 23 November 2005 11:58, Vojtech Pavlik wrote:
> >  static int itmtouch_open(struct input_dev *input)
> >  {
> >       struct itmtouch_dev *itmtouch = input->private;
> >  
> > +     if (itmtouch->users++)
> > +             return 0;
> > +

Why are you adding this? input_open/close are serialized and called
only once when needed.

> >       itmtouch->readurb->dev = itmtouch->usbdev;
> >  
> >       if (usb_submit_urb(itmtouch->readurb, GFP_KERNEL))
> > +     {
> > +             itmtouch->users--;
> >               return -EIO;
> > +     }
> >  

Brace should go on the same line with "if".

> > -     usb_to_input_id(udev, &itmtouch->inputdev.id);
> > +     itmtouch->inputdev.id.bustype = BUS_USB;
> > +     itmtouch->inputdev.id.vendor = udev->descriptor.idVendor;
> > +     itmtouch->inputdev.id.product = udev->descriptor.idProduct;
> > +     itmtouch->inputdev.id.version = udev->descriptor.bcdDevice;
> >       itmtouch->inputdev.dev = &intf->dev;

Why are you replacing perfectly good code with incorrect one (endianess
issues)?

Plus you need to convert it to dynamic input_dev allocation for newer
kernels. 

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux