All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Hans-Christian Egtvedt <hc@mivu.no>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-input@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH 2.6.14.2] Updated itmtouch kernel usb input driver (1/1)
Date: Wed, 23 Nov 2005 21:01:33 -0500	[thread overview]
Message-ID: <200511232101.33783.dtor_core@ameritech.net> (raw)
In-Reply-To: <20051123165813.GA3201@ucw.cz>

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

  reply	other threads:[~2005-11-24  2:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 16:52 [PATCH 2.6.14.2] Updated itmtouch kernel usb input driver (1/1) Hans-Christian Egtvedt
2005-11-23 16:58 ` Vojtech Pavlik
2005-11-24  2:01   ` Dmitry Torokhov [this message]
2005-11-30 19:31     ` Hans-Christian Egtvedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511232101.33783.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=hc@mivu.no \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.