[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110102075852.GB5429@core.coreip.homeip.net>
Date: Sat, 1 Jan 2011 23:58:53 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Fabien Marteau <fabien.marteau@...adeus.com>
Cc: Scott Moreau <oreaus@...il.com>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: joystick: Adding Austria Microsystem AS5011
joystick driver (second version)
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists