mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Fabien Marteau <fabien.marteau@armadeus.com>
Cc: Scott Moreau <oreaus@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: joystick:   Adding Austria Microsystem AS5011 joystick driver (second version)
Date: Sat, 1 Jan 2011 23:58:53 -0800	[thread overview]
Message-ID: <20110102075852.GB5429@core.coreip.homeip.net> (raw)
In-Reply-To: <4D1C60F1.5090305@armadeus.com>

On Thu, Dec 30, 2010 at 11:37:37AM +0100, Fabien Marteau wrote:
> +
> +	plat_dat->input_dev->name = "Austria Microsystem as5011 joystick";
> +	plat_dat->input_dev->uniq = "Austria0";

This is improper value for 'uniq' which has to be globally unique
identifier (across systems). like a serial number.

> +	plat_dat->input_dev->id.bustype = BUS_I2C;
> +	plat_dat->input_dev->phys = NULL;

No need to set this to NULL.

> +	plat_dat->input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
> +	plat_dat->input_dev->keybit[BIT_WORD(BTN_JOYSTICK)] =
> +					BIT_MASK(BTN_JOYSTICK);

__set_bit() is shorter and generally safer (no chance of writing to
wrong longword).

-- 
Dmitry

      parent reply	other threads:[~2011-01-02  8:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 10:37 Fabien Marteau
2010-12-31 10:14 ` Trilok Soni
2010-12-31 11:38   ` Fabien Marteau
2011-01-02  7:41     ` Dmitry Torokhov
2011-01-02  7:58 ` Dmitry Torokhov [this message]

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=20110102075852.GB5429@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=fabien.marteau@armadeus.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oreaus@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®