Linux Input/HID development
 help / color / mirror / Atom feed
* Re: Another ALPS touchpad
From: Tommy Will @ 2014-01-05  2:53 UTC (permalink / raw)
  To: Dylan Paul Thurston; +Cc: Dmitry Torokhov, Yunkang Tang, linux-input
In-Reply-To: <20140104133108.GA7296@whitehail.bostoncoop.net>

2014/1/4 Dylan Paul Thurston <dpthurst@indiana.edu>:
>
> I didn't quite follow this or the following discussion. One thing I
> wanted to look into was whether it was possible to have a middle mouse
> click in addition to the left and right clicks.

Normally, clickpad only supports Left/Right click. I'm afraid middle
click would not be supported as standard.
However, if you have interest in middle click, based on our patch, you
can support that by yourself.
# Since it's a clickpad with only one button, you can report any
button event as you like by detecting the finger area when clicking.

> I had reported spurious clicks with the generic driver; I'm quite sure I'm not
> actually touching the pad when this happens, in case that's relevant.

I'm not sure where is wrong with generic driver. We would check the
behavior with latest kernel later.


-- 
Best Regards,
Tommy

^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: Sebastian Reichel @ 2014-01-05  3:47 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Jingoo Han, Fugang Duan, Peter Ujfalusi,
	".linux-kernel"
In-Reply-To: <20140104090147.GA16680@core.coreip.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Sat, Jan 04, 2014 at 01:01:48AM -0800, Dmitry Torokhov wrote:
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> Compile-tested only.
> 
>  drivers/input/keyboard/twl4030_keypad.c | 70 +++++++++++----------------------
>  1 file changed, 22 insertions(+), 48 deletions(-)

I have successfully booted dtor/input.git:master with this patch on
top and the addition of twl4030-keypad DT nodes in omap3-n900.dts on
my N900.

Tested-by: Sebastian Reichel <sre@debian.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCHv4 0/2] twl4030-keypad DT binding
From: Sebastian Reichel @ 2014-01-05  3:50 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Rob Landley, Grant Likely,
	devicetree, linux-doc, linux-kernel
In-Reply-To: <20140104084901.GA1991@core.coreip.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

On Sat, Jan 04, 2014 at 12:49:01AM -0800, Dmitry Torokhov wrote:
> On Sat, Jan 04, 2014 at 06:40:06AM +0100, Sebastian Reichel wrote:
> > What's the status of this patch? Can you queue this for 3.14?
> 
> I just queued it.

Thanks.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: Another ALPS touchpad
From: Dmitry Torokhov @ 2014-01-05 23:47 UTC (permalink / raw)
  To: Tommy Will; +Cc: Dylan Paul Thurston, Yunkang Tang, linux-input
In-Reply-To: <CA+F6ckMzRnP2E--nimZA+-cfR_wmbsN4hPvr4AONt4J_c_X4kw@mail.gmail.com>

On Sun, Jan 05, 2014 at 10:53:52AM +0800, Tommy Will wrote:
> 2014/1/4 Dylan Paul Thurston <dpthurst@indiana.edu>:
> >
> > I didn't quite follow this or the following discussion. One thing I
> > wanted to look into was whether it was possible to have a middle mouse
> > click in addition to the left and right clicks.
> 
> Normally, clickpad only supports Left/Right click. I'm afraid middle
> click would not be supported as standard.

On devices that lack middle button middle click is usually emulated by
pressing both left and right buttons. Also, since this is multi-touch
device quite often middle click is mapped on 2- or 3-finger tap. All of
that is done in X driver and not in kernel.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: Jingoo Han @ 2014-01-06  2:25 UTC (permalink / raw)
  To: 'Dmitry Torokhov', 'Sebastian Reichel'
  Cc: linux-input, 'Fugang Duan', 'Peter Ujfalusi',
	".linux-kernel", 'Jingoo Han'
In-Reply-To: <20140104090147.GA16680@core.coreip.homeip.net>

On Saturday, January 04, 2014 6:02 PM, Dmitry Torokhov wrote:
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> Compile-tested only.
> 
> 
>  drivers/input/keyboard/twl4030_keypad.c | 70 +++++++++++----------------------
>  1 file changed, 22 insertions(+), 48 deletions(-)
> 
> diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
> index f663c19..71eb041 100644
> --- a/drivers/input/keyboard/twl4030_keypad.c
> +++ b/drivers/input/keyboard/twl4030_keypad.c

[.....]

> -static int twl4030_kp_remove(struct platform_device *pdev)
> -{
> -	struct twl4030_keypad *kp = platform_get_drvdata(pdev);
> -
> -	free_irq(kp->irq, kp);
> -	input_unregister_device(kp->input);

Hi Dmitry Torokhov,

IMHO, input_unregister_device() seems to be necessary,
because input_register_device() is still used.
If I am wrong, please let me know kindly.

Sebastian Reichel,
Would you repeat insmod & rmmod 'twl4030_keypad.ko'?

Happy New Year! :-)

Best regards,
Jingoo Han


^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: 'Sebastian Reichel' @ 2014-01-06  2:33 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Dmitry Torokhov', linux-input, 'Fugang Duan',
	'Peter Ujfalusi', ".linux-kernel"
In-Reply-To: <007901cf0a86$a0639550$e12abff0$%han@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

On Mon, Jan 06, 2014 at 11:25:54AM +0900, Jingoo Han wrote:
> IMHO, input_unregister_device() seems to be necessary,
> because input_register_device() is still used.
> If I am wrong, please let me know kindly.
> 
> Sebastian Reichel,
> Would you repeat insmod & rmmod 'twl4030_keypad.ko'?

mh. I only tested with twl4030-keypad compiled into the kernel.
I will try building the driver as module and reloading it on
the device when I find some time.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: Jingoo Han @ 2014-01-06  2:50 UTC (permalink / raw)
  To: 'Sebastian Reichel'
  Cc: 'Dmitry Torokhov', linux-input, 'Fugang Duan',
	'Peter Ujfalusi', ".linux-kernel",
	'Jingoo Han'
In-Reply-To: <20140106023358.GA11575@earth.universe>

On Monday, January 06, 2014 11:34 AM, Sebastian Reichel wrote:
> On Mon, Jan 06, 2014 at 11:25:54AM +0900, Jingoo Han wrote:
> > IMHO, input_unregister_device() seems to be necessary,
> > because input_register_device() is still used.
> > If I am wrong, please let me know kindly.
> >
> > Sebastian Reichel,
> > Would you repeat insmod & rmmod 'twl4030_keypad.ko'?
> 
> mh. I only tested with twl4030-keypad compiled into the kernel.
> I will try building the driver as module and reloading it on
> the device when I find some time.

OK, I see. :-)

If you repeat at least twice insmod & rmmod 'twl4030_keypad.ko',
it will be good. If there are some bugs, it will make the error
messages or kernel panic.

In my case, Samsung Exynos SPI driver made kernel panic when
Repeating insmod & rmmod twice, after the patch to covert to
devm_* functions was applied. This was because there was a bug
of devm_spi_register_master().

Thank you.

Best regards,
Jingoo Han


^ permalink raw reply

* Re: Another ALPS touchpad
From: Tommy Will @ 2014-01-06  3:16 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Dylan Paul Thurston, Yunkang Tang, linux-input
In-Reply-To: <20140105234723.GA32292@core.coreip.homeip.net>

2014/1/6 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> On devices that lack middle button middle click is usually emulated by
> pressing both left and right buttons. Also, since this is multi-touch
> device quite often middle click is mapped on 2- or 3-finger tap. All of
> that is done in X driver and not in kernel.
>

Thanks for your info. Got that.

-- 
Best Regards,
Tommy

^ permalink raw reply

* Re: [PATCH 3/5] mfd: ti_am335x_tscadc: Don't read back REG_SE
From: Lee Jones @ 2014-01-06  9:35 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Samuel Ortiz, Jonathan Cameron, Dmitry Torokhov, Zubair Lutfullah,
	Felipe Balbi, linux-iio, linux-input, linux-kernel
In-Reply-To: <1387466911-3732-4-git-send-email-bigeasy@linutronix.de>

On Thu, 19 Dec 2013, Sebastian Andrzej Siewior wrote:

> The purpose of reg_se_cache has been defeated. It should avoid the
> read-back of the register to avoid the latency and the fact that the
> bits are reset to 0 after the individual conversation took place.
> 
> The reason why this is required like this to work, is that read-back of
> the register removes the bits of the ADC so they do not start another
> conversation after the register is re-written from the TSC side for the
> update.
> To avoid the not required read-back I introduce a "set once" variant which
> does not update the cache mask. After the conversation completes, the
> bit is removed from the SE register anyway and we don't plan a new
> conversation "any time soon". The current set function is renamed to
> set_cache to distinguish the two operations.
> This is a small preparation for a larger sync-rework.
> 
> Acked-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  drivers/iio/adc/ti_am335x_adc.c           |  4 ++--
>  drivers/input/touchscreen/ti_am335x_tsc.c |  4 ++--

Just need Dmitry's Ack now.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 1/5] iio: ti_am335x_adc: Adjust the closing bracket in tiadc_read_raw()
From: Lee Jones @ 2014-01-06  9:36 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Sebastian Andrzej Siewior, Samuel Ortiz, Dmitry Torokhov,
	Zubair Lutfullah, Felipe Balbi, linux-iio, linux-input,
	linux-kernel
In-Reply-To: <52B71973.1000907@kernel.org>

On Sun, 22 Dec 2013, Jonathan Cameron wrote:

> On 12/19/13 15:28, Sebastian Andrzej Siewior wrote:
> > It somehow looks like the ending bracket belongs to the if statement but
> > it does belong to the while loop. This patch moves the bracket where it
> > belongs.
> > 
> > Reviewed-by: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Acked-by: Jonathan Cameron <jic23@kernel.org>
> 
> Lee, I'm assuming you are fine taking the whole series!

Sure, no problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 1/4] input: Add new sun4i-lradc-keys drivers
From: Heiko Stübner @ 2014-01-06 10:04 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Maxime Ripard, Hans de Goede,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell
In-Reply-To: <20140103182349.GA13489-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>

Am Freitag, 3. Januar 2014, 10:23:50 schrieb Dmitry Torokhov:
> On Fri, Jan 03, 2014 at 06:36:05PM +0100, Maxime Ripard wrote:
> > On Thu, Jan 02, 2014 at 11:36:33PM +0100, Hans de Goede wrote:
> > > Hi,
> > > 
> > > On 01/02/2014 09:20 PM, Maxime Ripard wrote:
> > > >On Thu, Jan 02, 2014 at 02:45:29PM +0100, Hans de Goede wrote:
> > > >>>Also, instead of inventing yet another vendor-specific property, why
> > > >>>not re-use> > >>>
> > > >>>a button binding similar to gpio-keys like:
> > > >>>        lradc: lradc@01c22800 {
> > > >>>        
> > > >>>                compatible = "allwinner,sun4i-lradc-keys";
> > > >>>                reg = <0x01c22800 0x100>;
> > > >>>                interrupts = <31>;
> > > >>>                allwinner,chan0-step = <200>;
> > > >>>		
> > > >>>		#address-cells = <1>;
> > > >>>		#size-cells = <0>;
> > > >>>		
> > > >>>		button@0 {
> > > >>>		
> > > >>>			reg = <0>; /* your channel index from above */
> > > >>>			linux,code = <115>; /* already used as dt-property */
> > > >>>		
> > > >>>		};
> > > >>>		
> > > >>>		button@1 {
> > > >>>		
> > > >>>			reg = <1>;
> > > >>>			linux,code = <114>;
> > > >>>		
> > > >>>		};
> > > >>
> > > >>Ugh no. Having a vendor specific property which is KISS certainly
> > > >>beats this, both wrt ease of writing dts files as well as wrt the
> > > >>dts parsing code in the driver.
> > > >
> > > >I'd agree with Heiko here. This is pretty much the same construct
> > > >that's already in use in other input drivers, like gpio-keys.
> > > 
> > > In the gpio case there is a 1 on 1 relation between a single hw
> > > entity (the gpio-pin) and a single keycode. Here there is 1 hw entity
> > > which maps to an array of key-codes, certainly using an array rather
> > > then a much more complicated construct is the correct data-structure
> > > to represent this.
> > 
> > You can build an array in your driver out of this very easily, it's 10
> > lines in your probe. And you gain from this something that is more
> > generic, can be shared by other similar drivers and is consistent with
> > what is already in use.
> 
> How will it be shared? Surely not code-wise, but basically in spirit
> only. It seems to me that the originally proposed binding is simple and
> concise and works well for the driver.

I don't think "binding [...] works well for the driver" is the correct 
direction. From my understanding the binding should describe the hardware in 
an os-agnostic way (so "linux,foo" properties should stay the exception) and 
not the data structures used in the driver. The driver itself then implements 
the binding to convert the binding-data into a structure it wants to use.

The sharing would, as you suggested, be in spirit and in the use of already 
established dt-properties without introducing more non-standard ones.


Heiko

^ permalink raw reply

* Re: [PATCH 1/4] input: Add new sun4i-lradc-keys drivers
From: Maxime Ripard @ 2014-01-06 10:13 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Hans de Goede, Heiko Stübner,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell
In-Reply-To: <20140103182349.GA13489-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5302 bytes --]

On Fri, Jan 03, 2014 at 10:23:50AM -0800, Dmitry Torokhov wrote:
> On Fri, Jan 03, 2014 at 06:36:05PM +0100, Maxime Ripard wrote:
> > On Thu, Jan 02, 2014 at 11:36:33PM +0100, Hans de Goede wrote:
> > > Hi,
> > > 
> > > On 01/02/2014 09:20 PM, Maxime Ripard wrote:
> > > >On Thu, Jan 02, 2014 at 02:45:29PM +0100, Hans de Goede wrote:
> > > >>>Also, instead of inventing yet another vendor-specific property, why not re-use
> > > >>>a button binding similar to gpio-keys like:
> > > >>>
> > > >>>        lradc: lradc@01c22800 {
> > > >>>                compatible = "allwinner,sun4i-lradc-keys";
> > > >>>                reg = <0x01c22800 0x100>;
> > > >>>                interrupts = <31>;
> > > >>>                allwinner,chan0-step = <200>;
> > > >>>
> > > >>>		#address-cells = <1>;
> > > >>>		#size-cells = <0>;
> > > >>>
> > > >>>		button@0 {
> > > >>>			reg = <0>; /* your channel index from above */
> > > >>>			linux,code = <115>; /* already used as dt-property */
> > > >>>		};
> > > >>>
> > > >>>		button@1 {
> > > >>>			reg = <1>;
> > > >>>			linux,code = <114>;
> > > >>>		};
> > > >>
> > > >>Ugh no. Having a vendor specific property which is KISS certainly
> > > >>beats this, both wrt ease of writing dts files as well as wrt the
> > > >>dts parsing code in the driver.
> > > >
> > > >I'd agree with Heiko here. This is pretty much the same construct
> > > >that's already in use in other input drivers, like gpio-keys.
> > > 
> > > In the gpio case there is a 1 on 1 relation between a single hw
> > > entity (the gpio-pin) and a single keycode. Here there is 1 hw entity
> > > which maps to an array of key-codes, certainly using an array rather
> > > then a much more complicated construct is the correct data-structure
> > > to represent this.
> > 
> > You can build an array in your driver out of this very easily, it's 10
> > lines in your probe. And you gain from this something that is more
> > generic, can be shared by other similar drivers and is consistent with
> > what is already in use.
> 
> How will it be shared? Surely not code-wise, but basically in spirit
> only. It seems to me that the originally proposed binding is simple and
> concise and works well for the driver.

See Heiko's answer, but I do believe the code can be shared as well if
needs be.

> > > >This is also something that can really easily be made generic,
> > > >since this is something that is rather common.
> > > >
> > > >Speaking of which. I believe this should actually come in two
> > > >different drivers:
> > > >   - The ADC driver itself, using IIO
> > > >   - A generic button handler driver on top of IIO.
> > > >
> > > > The fact that on most board this adc is used for buttons doesn't make
> > > > any difference, it's actually a hardware designer choice, we should
> > > > support that choice, but we should also be able to use it just as an
> > > > ADC.
> > > 
> > > No, this is not a generic adc, as mentioned in the commit msg, this
> > > adc is specifically designed to be used this way.
> > > 
> > > The adc won't start sampling data, and won't generate any interrupts
> > > until a button is pressed. That is until the input voltage drops below
> > > 2/3 of Vref, this is checked through a built-in analog comparator, which
> > > hooks into the control logic.
> > > 
> > > It has button down and button up interrupts, and can detect long
> > > presses (unused) and generate a second type of down interrupt for those.
> > > 
> > > This really is an input device, which happens to use an adc.
> > 
> > Hmm, yes, ok.
> > 
> > > >Carlo Caione already started to work on an IIO driver for the LRADC:
> > > >https://github.com/carlocaione/linux/tree/sunxi-lradc
> > > >maybe you can take over his work.
> > > 
> > > That won't work because the adc won't sample if the input gets above
> > > 2/3 of Vref. There may be some other mode which does not do that, but
> > > that is not clearly documented.
> > > 
> > > Even if an IIO driver turns out to be doable, I strongly believe that
> > > having a separate input driver for this is best, since this device
> > > was designed to be used as such. Building input on top of IIO would
> > > mean polling the adc, while with my driver it actually generates
> > > button down / up interrupts without any polling being involved.
> > 
> > Not really. iio_channel_read calls the read_raw function (in that
> > case) of your driver. If the read_raw function in your driver wants to
> > poll the device, fine, but most of the time, it will just block
> > waiting for an interrupt to come and return the data to the caller,
> > which is obviously the saner behaviour, and you don't actually end up
> > polling the device. Which is pretty much the architecture you're using
> > already, just with an intermediate layer in between.
> 
> What is the benefit of the IIO layer if device can't really be used as
> IIO? I am all for moving as many generic devices as we can to IIO but we
> should recognize that sometimes the device is not an IIO device.

Yes, I've agreed to that. I was just clarifying Hans' statement.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: T440s Synaptics clickpad: lost sync / KBC bad data
From: J. Domburg @ 2014-01-06 10:25 UTC (permalink / raw)
  To: linux-input
In-Reply-To: <alpine.DEB.2.00.1312151507560.6449@icf1.fcevgrfzbqf.pbz>

Hi all,

A last message about this issue, to help future people who find this 
data: In my case, it seems the problem was the hardware. For me the 
problem got increasingly worse, and also showed itself during a Win7 
installation and Win8 rescue session. Strangely, Windows 8 itself was less 
affected by the issue; maybe it has drivers that reset the Clickpad IC 
much quicker than Linux and the Windows installers.

With that data, I managed to convince Lenovo Support to exchange the 
clickpad hardware. (This means exchanging the complete keyboard bezel 
which means almost completely disassembling the machine, by the way...) 
The new clickpad has been working without _any_ lost sync byte for about a 
week now, so I'm a happy camper.

In the meantime, some other people have contacted me with the same issues. 
As far as I'm aware, they haven't solved it yet either by software or 
hardware exchange, but it may mean this is an issue a small amount of 
T440s's may have in general.

Anyway, sorry for the spam.

Cheers,
Jeroen

On Sun, 15 Dec 2013, J. Domburg wrote:

> Hello everyone,
>
> I hope I'm at the right address here with my problems. If not, please do 
> point me in the correct direction.
>
> I have a Lenovo Thinkpad T440s with a Synaptics clickpad and an IBM 
> trackpoint in it:
>
> input: PS/2 Synaptics TouchPad as 
> /devices/platform/i8042/serio1/input/input120
> psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 
> 0xd001a3/0x940300/0x127c00, board id: 2668, fw id: 1293989
> psmouse serio1: synaptics: serio: Synaptics pass-through port at 
> isa0060/serio1/input0
> input: SynPS/2 Synaptics TouchPad as 
> /devices/platform/i8042/serio1/input/input123
> psmouse serio34: alps: Unknown ALPS touchpad: E7=10 00 64, EC=10 00 64
> psmouse serio34: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3 
> input: TPPS/2 IBM TrackPoint as 
> /devices/platform/i8042/serio1/serio34/input/input124
>
> The problem is that the trackpoint behaves incredibly erratic, sometimes 
> working correctly for minutes at a time, sometimes just jumping around and 
> many times just hanging. I need to remove and re-insert the psmouse module to 
> solve that. Alongside this behaviour, my kernel log also is getting spammed 
> with messages like:
>
> psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
> psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
> psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
> psmouse serio1: TouchPad at isa0060/serio1/input0 - driver resynced.
> and psmouse serio1: bad data from KBC - timeout
>
> What I've tried:
> - Tried the kernel options i8042.nomux=1 and i8042.reset=1
> - Disable acpi by passing acpi=off to the kernel
> - Disabled CPU frequency scaling
> - Trying other protocols, e.g. by doing modprobe psmouse proto=imps or 
> proto=bare
> - Switching from vanilla 3.12 kernel to both the latest&greatest kernel from 
> Linus' Git and an antique 3.1.0 kernel
> - Turning on i8042.debug. To my untrained eye, it looks like bytes of PS/2 
> data are just disappearing when the 'lost sync' messages kick in. I can give 
> an example of that if needed.
>
> Strangely, the symptoms have been getting worse in the 10 days I've had this 
> machine: from the first few days with no trouble to today with the mouse 
> crapping out almost once every ten seconds or so. I would say it's a DOA and 
> claim my warranty, if not frustratingly the machine works perfectly fine in 
> Windows 8, with no touchpad trouble at all.
>
> I'm willing to try things on this machine, run patches or take any hint in 
> what I can change to get this working; if it helps I can even poke an 
> oscilloscope at the PS2 lines. Not having a working touchpad or touchpoint is 
> getting a bit frustrating...
>
> Cheers,
> Jeroen
>
>
>
>

^ permalink raw reply

* Re: [lm-sensors] [PATCH v3 2/5] input: sun4i-ts: Add support for temperature sensor
From: Maxime Ripard @ 2014-01-06 11:00 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Hans de Goede, Dmitry Torokhov, LM Sensors,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Corentin LABBE,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <52C84665.5070203-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]

Hi Guenter,

On Sat, Jan 04, 2014 at 09:35:33AM -0800, Guenter Roeck wrote:
> On 12/31/2013 08:20 AM, Hans de Goede wrote:
> >The sun4i resisitive touchscreen controller also comes with a built-in
> >temperature sensor. This commit adds support for it.
> >
> >This commit also introduces a new "ts-attached" device-tree property,
> >when this is not set, the input part of the driver won't register. This way
> >the internal temperature sensor can be used to measure the SoC temperature
> >independent of there actually being a touchscreen attached to the controller.
> >
> >Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> 
> Couple of minor comments below, though no need to resubmit unless someone else has comments.
> 
> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> 
> >---
> >  .../bindings/input/touchscreen/sun4i.txt           |   5 +
> >  drivers/input/touchscreen/sun4i-ts.c               | 140 ++++++++++++++++-----
> >  2 files changed, 114 insertions(+), 31 deletions(-)
> >
> >diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> >index e45927e..6bac67b 100644
> >--- a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> >+++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt
> >@@ -6,10 +6,15 @@ Required properties:
> >   - reg: mmio address range of the chip
> >   - interrupts: interrupt to which the chip is connected
> >
> >+Optional properties:
> >+ - allwinner,ts-attached: boolean indicating that an actual touchscreen is
> >+			  attached to the controller
> >+
> Brr. While I understand that you were asked to do this, I don't
> really see the benefit of another "allwinner" here. As if this
> wasn't implied by the "compatible" property.

It's actually the ePAPR that recommends this.

Section 6.1.1, General Principles

"
Some recommended practices includes:
[..]
  5. If new properties are needed by the binding, the recommended
     format for property names is: “<company>,<property-name>”, where
     <company> is an OUI or short unique string like a stock ticker
     that identifies the creator of the binding.
"

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [patch 3/3] HID: multitouch: add support of other generic collections in hid-mt
From: Benjamin Tissoires @ 2014-01-06 16:47 UTC (permalink / raw)
  To: Jiri Kosina, Henrik Rydberg
  Cc: Benjamin Tissoires, Edel Maks, linux-input, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1401031056000.14951@pobox.suse.cz>

On 03/01/14 04:56, Jiri Kosina wrote:
> On Sat, 21 Dec 2013, Henrik Rydberg wrote:
> 
>>> The ANTEC Touch Pad is a device which can switch from a multitouch
>>> touchpad to a mouse. It thus presents several generic collections which
>>> are currently ignored by hid-multitouch. Enable them by using the generic
>>> protocol. Adding also a suffix for them depending on their application.
>>
>> In what way does this and the preceeding patches differ from "else if (is_pen ||
>> export_all_inputs)"? Adding a functional pattern which then is converted to a
>> generic case, such that the usual branching is bound to occur anyways, seems
>> unnecessary.
> 
> Benjamin,
> 
> did you have chance to do any followup work on this?
> 
> If this is to go into 3.14, it's the time to have the thing finalized.
> 

Hi Jiri,

well, I'm still not sure what to answer to address Henrik's comments. I
will work on that later in the week I think, but currently I am focusing
on hid-logitech-dj and others, which is rather time consuming.

I think Maks is fine with the current status (he still have to use a
backport due to an arm platform), so let's skip this for 3.15.

Cheers,
Benjamin


^ permalink raw reply

* Re: [PATCH] HID: quirk for Saitek RAT7 and MMO7 mices' mode button
From: Benjamin Tissoires @ 2014-01-06 17:54 UTC (permalink / raw)
  To: Conan; +Cc: linux-input, Jiri Kosina
In-Reply-To: <CAN+gG=EfhNrJYoaTcqa8bTEM1AbBzF2Roq=CWb7QSTVL3Ownfw@mail.gmail.com>

Sorry for the repost, my gmail decided to send HTML instead of plain
text... :(

On 06/01/14 12:24, Benjamin Tissoires wrote:
> Hi Conan,
> 
> Peter asked me to have a look at a similar device in the X bugzilla [1],
> so I will also comment here in the hope we will finally find an upstream
> solution.
> 
> 
> On Thu, Jan 2, 2014 at 2:56 PM, Conan <conan@braincalibration.de
> <mailto:conan@braincalibration.de>> wrote:
> 
>     -----BEGIN PGP SIGNED MESSAGE-----
>     Hash: SHA1
> 
>     Hi all,
> 
>     this patch adds support for some saitek mice which implement a tristate
>     button (for switching button mappings in the official windows driver) by
>     keeping one of three (non-physical) buttons constantly pressed. This
>     breaks X and probably other userspace software.
> 
>     The patch below implements a quirk which instantly sends a release event
>     for the affected buttons.
> 
>     Disclaimer: this is not entirely my own work, it is based on a patch for
>     the R.A.T.7. which was posted here:
>     http://us.generation-nt.com/answer/patch-2-6-38-mode-button-quirk-saitek-cyborg-t-7-help-202649672.html
> 
>     I merely added two usb ids and kept it up to date.
> 
> 
> Please add your Signed-off-by line and use your real name (see
> Documentation/SubmittingPatches in the kernel tree).
> 
> Also add Jiri in CC if you ever want it to be included in his tree
> (which I assume you want).
>  
> 
> 
>     - --- a/drivers/hid/hid-ids.h   2013-10-08 15:20:58.781792791 +0200
>     +++ b/drivers/hid/hid-ids.h     2013-10-08 15:22:17.815804729 +0200
>     @@ -714,6 +714,9 @@
>      #define USB_VENDOR_ID_SAITEK           0x06a3
>      #define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17
>      #define USB_DEVICE_ID_SAITEK_PS1000    0x0621
>     +#define USB_DEVICE_ID_SAITEK_RAT7      0x0ccb
>     +#define USB_DEVICE_ID_SAITEK_RAT7TOO   0x0cd7
>     +#define USB_DEVICE_ID_SAITEK_MMO7      0x0cd0
> 
>      #define USB_VENDOR_ID_SAMSUNG          0x0419
>      #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE        0x0001
>     - --- a/drivers/hid/hid-input.c 2013-01-31 19:09:35.058570485 +0100
>     +++ b/drivers/hid/hid-input.c   2013-01-31 19:11:57.779833199 +0100
> 
> 
> This should go into hid-saitek, not hid-input. It is really specific and
> no other device will benefit from it, so move it where it belongs.
>  
> 
>     @@ -1039,6 +1039,25 @@
> 
>             if ((field->flags & HID_MAIN_ITEM_RELATIVE) && (usage->type
>     == EV_KEY))
>                     input_event(input, usage->type, usage->code, 0);
>     +
>     +       /* hack for Saitek RAT mice which report release events for
>     their
>     +        * mode button on the NEXT press event: instant release
>     +       */
>     +       if ((*quirks & HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE) &&
>     +               value && usage->type == EV_KEY &&
>     +               /* RAT7 uses buttons 13,14,15 */
>     +               ((usage->code >= BTN_MOUSE + 8 && usage->code <=
>     BTN_MOUSE + 10) ||
>     +               /* MMO7 uses button 20 */
>     +               (usage->code == BTN_MOUSE + 15)) &&
>     +               test_bit(usage->code, input->key)) {
>     +               input_event(input, usage->type, usage->code, 0);
>     +               /* we'll get a real release event from the mouse
>     anyway, and
>     +                * userspace should cope with the extra input-layer
>     +                * button-up events anyway; just re-set the bit to stop
>     +                * spurious button-down events
>     +                */
>     +               set_bit(usage->code, input->key);
> 
> 
> This is just weird. input_event should take care of that. I bet you are
> missing an input_sync event before releasing the key (or after).
>  
> 
>     +       }
>      }
> 
> 
>      void hidinput_report_event(struct hid_device *hid, struct hid_report
>     *report)
>     - --- a/drivers/hid/usbhid/hid-quirks.c 2013-01-31
>     19:09:35.058570485 +0100
>     +++ b/drivers/hid/usbhid/hid-quirks.c   2013-01-31
>     19:12:58.195232311 +0100
>     @@ -82,6 +82,9 @@
>             { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001,
>     HID_QUIRK_NOGET },
>             { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008,
>     HID_QUIRK_NOGET },
>             { USB_VENDOR_ID_REALTEK, USB_DEVICE_ID_REALTEK_READER,
>     HID_QUIRK_NO_INIT_REPORTS },
>     +       { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7,
>     HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE },
>     +       { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7TOO,
>     HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE },
>     +       { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7,
>     HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE },
>             { USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB,
>     HID_QUIRK_NOGET },
>             { USB_VENDOR_ID_SIGMATEL, USB_DEVICE_ID_SIGMATEL_STMP3780,
>     HID_QUIRK_NOGET },
>             { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE,
>     HID_QUIRK_NOGET },
>     - --- a/include/linux/hid.h     2013-05-18 03:16:26.713052127 +0200
>     +++ b/include/linux/hid.h       2013-05-18 03:17:23.407343351 +0200
>     @@ -283,6 +283,7 @@
>      #define HID_QUIRK_MULTI_INPUT                  0x00000040
>      #define HID_QUIRK_HIDINPUT_FORCE               0x00000080
>      #define HID_QUIRK_NO_EMPTY_INPUT               0x00000100
>     +#define HID_QUIRK_RAT_BROKEN_BUTTON_RELEASE    0x00000200
> 
> 
> Please do not add too specific fixup in the generic hid layer. (see the
> hid-saitek comment above).
>  
> 
>      #define HID_QUIRK_SKIP_OUTPUT_REPORTS          0x00010000
>      #define HID_QUIRK_FULLSPEED_INTERVAL           0x10000000
>      #define HID_QUIRK_NO_INIT_REPORTS              0x20000000
> 
>     - --
>     Regards,
>     C
> 
> 
> Two more comments:
> - given the Xorg bug, I think we should map the physical button to only
> one input button, not three (the goal is to remove the state, so we
> should do it correctly)
> - I can give you a hand in developing/debugging if you sent me some
> reports with hid-recorder [2]. Send some regular reports + the faulty
> button presses, and I'll be able to test it on my laptop.
> 
> Cheers,
> Benjamin
> 
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=32200
> [2] http://bentiss.github.io/hid-replay-docs/

^ permalink raw reply

* Re: [PATCH 3/5] mfd: ti_am335x_tscadc: Don't read back REG_SE
From: Dmitry Torokhov @ 2014-01-06 18:10 UTC (permalink / raw)
  To: Lee Jones
  Cc: Sebastian Andrzej Siewior, Samuel Ortiz, Jonathan Cameron,
	Zubair Lutfullah, Felipe Balbi, linux-iio, linux-input,
	linux-kernel
In-Reply-To: <20140106093525.GE23772@lee--X1>

On Mon, Jan 06, 2014 at 09:35:25AM +0000, Lee Jones wrote:
> On Thu, 19 Dec 2013, Sebastian Andrzej Siewior wrote:
> 
> > The purpose of reg_se_cache has been defeated. It should avoid the
> > read-back of the register to avoid the latency and the fact that the
> > bits are reset to 0 after the individual conversation took place.
> > 
> > The reason why this is required like this to work, is that read-back of
> > the register removes the bits of the ADC so they do not start another
> > conversation after the register is re-written from the TSC side for the
> > update.
> > To avoid the not required read-back I introduce a "set once" variant which
> > does not update the cache mask. After the conversation completes, the
> > bit is removed from the SE register anyway and we don't plan a new
> > conversation "any time soon". The current set function is renamed to
> > set_cache to distinguish the two operations.
> > This is a small preparation for a larger sync-rework.
> > 
> > Acked-by: Lee Jones <lee.jones@linaro.org>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > ---
> >  drivers/iio/adc/ti_am335x_adc.c           |  4 ++--
> >  drivers/input/touchscreen/ti_am335x_tsc.c |  4 ++--
> 
> Just need Dmitry's Ack now.

Well, that has nothing to do with input per se but rather inner workings
of the device. But yes, FWIW:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

^ permalink raw reply

* [PATCH] input: delete non-required instances of include <linux/init.h>
From: Paul Gortmaker @ 2014-01-06 18:11 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Paul Gortmaker

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[build tested allyes/modconfig on x86 and powerpc]

 drivers/input/gameport/emu10k1-gp.c          | 1 -
 drivers/input/gameport/fm801-gp.c            | 1 -
 drivers/input/joystick/a3d.c                 | 1 -
 drivers/input/joystick/adi.c                 | 1 -
 drivers/input/joystick/cobra.c               | 1 -
 drivers/input/joystick/gf2k.c                | 1 -
 drivers/input/joystick/grip.c                | 1 -
 drivers/input/joystick/grip_mp.c             | 1 -
 drivers/input/joystick/guillemot.c           | 1 -
 drivers/input/joystick/iforce/iforce.h       | 1 -
 drivers/input/joystick/interact.c            | 1 -
 drivers/input/joystick/joydump.c             | 1 -
 drivers/input/joystick/magellan.c            | 1 -
 drivers/input/joystick/sidewinder.c          | 1 -
 drivers/input/joystick/spaceball.c           | 1 -
 drivers/input/joystick/spaceorb.c            | 1 -
 drivers/input/joystick/stinger.c             | 1 -
 drivers/input/joystick/tmdc.c                | 1 -
 drivers/input/joystick/twidjoy.c             | 1 -
 drivers/input/joystick/warrior.c             | 1 -
 drivers/input/joystick/xpad.c                | 1 -
 drivers/input/joystick/zhenhua.c             | 1 -
 drivers/input/keyboard/adp5520-keys.c        | 1 -
 drivers/input/keyboard/adp5588-keys.c        | 1 -
 drivers/input/keyboard/adp5589-keys.c        | 1 -
 drivers/input/keyboard/bf54x-keys.c          | 1 -
 drivers/input/keyboard/goldfish_events.c     | 1 -
 drivers/input/keyboard/gpio_keys_polled.c    | 1 -
 drivers/input/keyboard/hil_kbd.c             | 1 -
 drivers/input/keyboard/imx_keypad.c          | 1 -
 drivers/input/keyboard/jornada680_kbd.c      | 1 -
 drivers/input/keyboard/jornada720_kbd.c      | 1 -
 drivers/input/keyboard/lkkbd.c               | 1 -
 drivers/input/keyboard/matrix_keypad.c       | 1 -
 drivers/input/keyboard/mcs_touchkey.c        | 1 -
 drivers/input/keyboard/mpr121_touchkey.c     | 1 -
 drivers/input/keyboard/newtonkbd.c           | 1 -
 drivers/input/keyboard/omap-keypad.c         | 1 -
 drivers/input/keyboard/omap4-keypad.c        | 1 -
 drivers/input/keyboard/pxa27x_keypad.c       | 1 -
 drivers/input/keyboard/pxa930_rotary.c       | 1 -
 drivers/input/keyboard/qt1070.c              | 1 -
 drivers/input/keyboard/qt2160.c              | 1 -
 drivers/input/keyboard/samsung-keypad.c      | 1 -
 drivers/input/keyboard/sh_keysc.c            | 1 -
 drivers/input/keyboard/spear-keyboard.c      | 1 -
 drivers/input/keyboard/stmpe-keypad.c        | 1 -
 drivers/input/keyboard/stowaway.c            | 1 -
 drivers/input/keyboard/sunkbd.c              | 1 -
 drivers/input/keyboard/tc3589x-keypad.c      | 1 -
 drivers/input/keyboard/twl4030_keypad.c      | 1 -
 drivers/input/keyboard/w90p910_keypad.c      | 1 -
 drivers/input/keyboard/xtkbd.c               | 1 -
 drivers/input/misc/ad714x.c                  | 1 -
 drivers/input/misc/adxl34x.c                 | 1 -
 drivers/input/misc/atlas_btns.c              | 1 -
 drivers/input/misc/bfin_rotary.c             | 1 -
 drivers/input/misc/cobalt_btns.c             | 1 -
 drivers/input/misc/da9052_onkey.c            | 1 -
 drivers/input/misc/da9055_onkey.c            | 1 -
 drivers/input/misc/dm355evm_keys.c           | 1 -
 drivers/input/misc/gpio_tilt_polled.c        | 1 -
 drivers/input/misc/keyspan_remote.c          | 1 -
 drivers/input/misc/max8997_haptic.c          | 1 -
 drivers/input/misc/mc13783-pwrbutton.c       | 1 -
 drivers/input/misc/mpu3050.c                 | 1 -
 drivers/input/misc/pcap_keys.c               | 1 -
 drivers/input/misc/pcf50633-input.c          | 1 -
 drivers/input/misc/pcf8574_keypad.c          | 1 -
 drivers/input/misc/pcspkr.c                  | 1 -
 drivers/input/misc/pm8xxx-vibrator.c         | 1 -
 drivers/input/misc/pmic8xxx-pwrkey.c         | 1 -
 drivers/input/misc/powermate.c               | 1 -
 drivers/input/misc/retu-pwrbutton.c          | 1 -
 drivers/input/misc/rotary_encoder.c          | 1 -
 drivers/input/misc/sgi_btns.c                | 1 -
 drivers/input/misc/sirfsoc-onkey.c           | 1 -
 drivers/input/misc/wm831x-on.c               | 1 -
 drivers/input/misc/yealink.c                 | 1 -
 drivers/input/mouse/appletouch.c             | 1 -
 drivers/input/mouse/bcm5974.c                | 1 -
 drivers/input/mouse/cypress_ps2.c            | 1 -
 drivers/input/mouse/gpio_mouse.c             | 1 -
 drivers/input/mouse/navpoint.c               | 1 -
 drivers/input/mouse/pxa930_trkball.c         | 1 -
 drivers/input/mouse/sermouse.c               | 1 -
 drivers/input/mouse/synaptics_usb.c          | 1 -
 drivers/input/mouse/vsxxxaa.c                | 1 -
 drivers/input/serio/altera_ps2.c             | 1 -
 drivers/input/serio/ambakmi.c                | 1 -
 drivers/input/serio/libps2.c                 | 1 -
 drivers/input/serio/olpc_apsp.c              | 1 -
 drivers/input/serio/pcips2.c                 | 1 -
 drivers/input/serio/q40kbd.c                 | 1 -
 drivers/input/serio/rpckbd.c                 | 1 -
 drivers/input/serio/serio_raw.c              | 1 -
 drivers/input/serio/xilinx_ps2.c             | 1 -
 drivers/input/tablet/acecad.c                | 1 -
 drivers/input/tablet/aiptek.c                | 1 -
 drivers/input/tablet/gtco.c                  | 1 -
 drivers/input/tablet/hanwang.c               | 1 -
 drivers/input/tablet/kbtab.c                 | 1 -
 drivers/input/tablet/wacom.h                 | 1 -
 drivers/input/touchscreen/ad7877.c           | 1 -
 drivers/input/touchscreen/ad7879.c           | 1 -
 drivers/input/touchscreen/ads7846.c          | 1 -
 drivers/input/touchscreen/atmel_mxt_ts.c     | 1 -
 drivers/input/touchscreen/atmel_tsadcc.c     | 1 -
 drivers/input/touchscreen/da9034-ts.c        | 1 -
 drivers/input/touchscreen/dynapro.c          | 1 -
 drivers/input/touchscreen/egalax_ts.c        | 1 -
 drivers/input/touchscreen/elo.c              | 1 -
 drivers/input/touchscreen/fujitsu_ts.c       | 1 -
 drivers/input/touchscreen/gunze.c            | 1 -
 drivers/input/touchscreen/hampshire.c        | 1 -
 drivers/input/touchscreen/inexio.c           | 1 -
 drivers/input/touchscreen/intel-mid-touch.c  | 1 -
 drivers/input/touchscreen/jornada720_ts.c    | 1 -
 drivers/input/touchscreen/lpc32xx_ts.c       | 1 -
 drivers/input/touchscreen/mainstone-wm97xx.c | 1 -
 drivers/input/touchscreen/max11801_ts.c      | 1 -
 drivers/input/touchscreen/mcs5000_ts.c       | 1 -
 drivers/input/touchscreen/mms114.c           | 1 -
 drivers/input/touchscreen/mtouch.c           | 1 -
 drivers/input/touchscreen/pcap_ts.c          | 1 -
 drivers/input/touchscreen/penmount.c         | 1 -
 drivers/input/touchscreen/s3c2410_ts.c       | 1 -
 drivers/input/touchscreen/stmpe-ts.c         | 1 -
 drivers/input/touchscreen/ti_am335x_tsc.c    | 1 -
 drivers/input/touchscreen/touchit213.c       | 1 -
 drivers/input/touchscreen/touchright.c       | 1 -
 drivers/input/touchscreen/touchwin.c         | 1 -
 drivers/input/touchscreen/tsc40.c            | 1 -
 drivers/input/touchscreen/ucb1400_ts.c       | 1 -
 drivers/input/touchscreen/usbtouchscreen.c   | 1 -
 drivers/input/touchscreen/wacom_w8001.c      | 1 -
 drivers/input/touchscreen/wm831x-ts.c        | 1 -
 drivers/input/touchscreen/zylonite-wm97xx.c  | 1 -
 138 files changed, 138 deletions(-)

diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index fa7a95c..2909e95 100644
--- a/drivers/input/gameport/emu10k1-gp.c
+++ b/drivers/input/gameport/emu10k1-gp.c
@@ -30,7 +30,6 @@
 
 #include <linux/module.h>
 #include <linux/ioport.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/slab.h>
 #include <linux/pci.h>
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c
index ae912d3..7c03114 100644
--- a/drivers/input/gameport/fm801-gp.c
+++ b/drivers/input/gameport/fm801-gp.c
@@ -27,7 +27,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/gameport.h>
 
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
index 85bc8dc..55efdfc 100644
--- a/drivers/input/joystick/a3d.c
+++ b/drivers/input/joystick/a3d.c
@@ -29,7 +29,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index 0cbfd2d..b784257 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/gameport.h>
-#include <linux/init.h>
 #include <linux/jiffies.h>
 
 #define DRIVER_DESC	"Logitech ADI joystick family driver"
diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c
index 65367e4..ae3ee24 100644
--- a/drivers/input/joystick/cobra.c
+++ b/drivers/input/joystick/cobra.c
@@ -29,7 +29,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c
index ab1cf28..0f519db 100644
--- a/drivers/input/joystick/gf2k.c
+++ b/drivers/input/joystick/gf2k.c
@@ -30,7 +30,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/gameport.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c
index 9e1beff..eac9c5b 100644
--- a/drivers/input/joystick/grip.c
+++ b/drivers/input/joystick/grip.c
@@ -28,7 +28,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c
index c0f9c7b..573191d 100644
--- a/drivers/input/joystick/grip_mp.c
+++ b/drivers/input/joystick/grip_mp.c
@@ -11,7 +11,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c
index 55196f7..a9ac2f9 100644
--- a/drivers/input/joystick/guillemot.c
+++ b/drivers/input/joystick/guillemot.c
@@ -30,7 +30,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/delay.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h
index b1d7d9b..96ae4f5 100644
--- a/drivers/input/joystick/iforce/iforce.h
+++ b/drivers/input/joystick/iforce/iforce.h
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/usb.h>
 #include <linux/serio.h>
diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c
index 88c2262..17c2c80 100644
--- a/drivers/input/joystick/interact.c
+++ b/drivers/input/joystick/interact.c
@@ -33,7 +33,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/delay.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c
index 7eb878b..d1c6e48 100644
--- a/drivers/input/joystick/joydump.c
+++ b/drivers/input/joystick/joydump.c
@@ -31,7 +31,6 @@
 #include <linux/gameport.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 
 #define DRIVER_DESC	"Gameport data dumper module"
diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c
index 9fb153e..c5358ba 100644
--- a/drivers/input/joystick/magellan.c
+++ b/drivers/input/joystick/magellan.c
@@ -31,7 +31,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Magellan and SpaceMouse 6dof controller driver"
 
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
index 04c69af..4a95b22 100644
--- a/drivers/input/joystick/sidewinder.c
+++ b/drivers/input/joystick/sidewinder.c
@@ -30,7 +30,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/gameport.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
index 80a7b27..f4445a4 100644
--- a/drivers/input/joystick/spaceball.c
+++ b/drivers/input/joystick/spaceball.c
@@ -33,7 +33,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 
diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c
index a41f291..f266782 100644
--- a/drivers/input/joystick/spaceorb.c
+++ b/drivers/input/joystick/spaceorb.c
@@ -32,7 +32,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 
diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c
index 0f51a60..099c6d7 100644
--- a/drivers/input/joystick/stinger.c
+++ b/drivers/input/joystick/stinger.c
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Gravis Stinger gamepad driver"
 
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c
index 5ef9bcd..7e17cde 100644
--- a/drivers/input/joystick/tmdc.c
+++ b/drivers/input/joystick/tmdc.c
@@ -33,7 +33,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/gameport.h>
 #include <linux/input.h>
 #include <linux/jiffies.h>
diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c
index 2556a81..7f7e5ab 100644
--- a/drivers/input/joystick/twidjoy.c
+++ b/drivers/input/joystick/twidjoy.c
@@ -52,7 +52,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Handykey Twiddler keyboard as a joystick driver"
 
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c
index 23b3071..e13a914 100644
--- a/drivers/input/joystick/warrior.c
+++ b/drivers/input/joystick/warrior.c
@@ -31,7 +31,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Logitech WingMan Warrior joystick driver"
 
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 75e3b10..618ea0a 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -74,7 +74,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/stat.h>
 #include <linux/module.h>
diff --git a/drivers/input/joystick/zhenhua.c b/drivers/input/joystick/zhenhua.c
index c4de438..30af2e8 100644
--- a/drivers/input/joystick/zhenhua.c
+++ b/drivers/input/joystick/zhenhua.c
@@ -49,7 +49,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"RC transmitter with 5-byte Zhen Hua protocol joystick driver"
 
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c
index ef26b17..92cebde 100644
--- a/drivers/input/keyboard/adp5520-keys.c
+++ b/drivers/input/keyboard/adp5520-keys.c
@@ -8,7 +8,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
 #include <linux/mfd/adp5520.h>
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c
index 3ed2351..7b7783b 100644
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@ -9,7 +9,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/workqueue.h>
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 60dafd4..297735a 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -8,7 +8,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/workqueue.h>
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c
index 09b91d0..861becf 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -30,7 +30,6 @@
 
 #include <linux/module.h>
 
-#include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
diff --git a/drivers/input/keyboard/goldfish_events.c b/drivers/input/keyboard/goldfish_events.c
index 9f60a2e..69e8547 100644
--- a/drivers/input/keyboard/goldfish_events.c
+++ b/drivers/input/keyboard/goldfish_events.c
@@ -14,7 +14,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/types.h>
 #include <linux/input.h>
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 4e42819..e571e19 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -17,7 +17,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/input-polldev.h>
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index 589e3c2..610a8af 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -36,7 +36,6 @@
 #include <linux/serio.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/completion.h>
 #include <linux/slab.h>
 #include <linux/pci_ids.h>
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
index 328cfc1..8f2b2ee 100644
--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -13,7 +13,6 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/err.h>
-#include <linux/init.h>
 #include <linux/input/matrix_keypad.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c
index a2a034c..69b1f00 100644
--- a/drivers/input/keyboard/jornada680_kbd.c
+++ b/drivers/input/keyboard/jornada680_kbd.c
@@ -16,7 +16,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/input-polldev.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c
index b0ad457..cd729d4 100644
--- a/drivers/input/keyboard/jornada720_kbd.c
+++ b/drivers/input/keyboard/jornada720_kbd.c
@@ -18,7 +18,6 @@
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c
index fc0a63c..9fcd9f1 100644
--- a/drivers/input/keyboard/lkkbd.c
+++ b/drivers/input/keyboard/lkkbd.c
@@ -65,7 +65,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/workqueue.h>
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 90ff73a..8d2e19e 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -14,7 +14,6 @@
 #include <linux/types.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c
index 7c236f9..68a9713 100644
--- a/drivers/input/keyboard/mcs_touchkey.c
+++ b/drivers/input/keyboard/mcs_touchkey.c
@@ -12,7 +12,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/i2c/mcs.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index f7f3e9a..fde6d79 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -13,7 +13,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c
index f971898..20f0443 100644
--- a/drivers/input/keyboard/newtonkbd.c
+++ b/drivers/input/keyboard/newtonkbd.c
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/input.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 
 #define DRIVER_DESC	"Newton keyboard driver"
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index d0d5226..b14b660 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -25,7 +25,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/types.h>
 #include <linux/input.h>
diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
index 30acfd4..0400b3f 100644
--- a/drivers/input/keyboard/omap4-keypad.c
+++ b/drivers/input/keyboard/omap4-keypad.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/errno.h>
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 186138c..d8241ba 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -18,7 +18,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/device.h>
diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c
index 248cdcf..5c6d593 100644
--- a/drivers/input/keyboard/pxa930_rotary.c
+++ b/drivers/input/keyboard/pxa930_rotary.c
@@ -8,7 +8,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c
index 6c561ec..52cd6e8 100644
--- a/drivers/input/keyboard/qt1070.c
+++ b/drivers/input/keyboard/qt1070.c
@@ -25,7 +25,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/input.h>
 #include <linux/slab.h>
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c
index 1c0ddad..819b228 100644
--- a/drivers/input/keyboard/qt2160.c
+++ b/drivers/input/keyboard/qt2160.c
@@ -19,7 +19,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/leds.h>
 #include <linux/module.h>
 #include <linux/slab.h>
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index ac43a48..c7ebe94 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -14,7 +14,6 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index fe0e498..ba4e416 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -12,7 +12,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/delay.h>
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
index 85ff530..258af10 100644
--- a/drivers/input/keyboard/spear-keyboard.c
+++ b/drivers/input/keyboard/spear-keyboard.c
@@ -12,7 +12,6 @@
 
 #include <linux/clk.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/io.h>
diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c
index 5cbec56..c6727dd 100644
--- a/drivers/input/keyboard/stmpe-keypad.c
+++ b/drivers/input/keyboard/stmpe-keypad.c
@@ -6,7 +6,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/keyboard/stowaway.c b/drivers/input/keyboard/stowaway.c
index cc612c5..a6e0d56 100644
--- a/drivers/input/keyboard/stowaway.c
+++ b/drivers/input/keyboard/stowaway.c
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/input.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 
 #define DRIVER_DESC	"Stowaway keyboard driver"
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index 5f836b1..dc6bb9d 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -31,7 +31,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/workqueue.h>
diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
index 208de7c..74494a3 100644
--- a/drivers/input/keyboard/tc3589x-keypad.c
+++ b/drivers/input/keyboard/tc3589x-keypad.c
@@ -10,7 +10,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index d2d178c..3535dc2 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -27,7 +27,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c
index 7b03916..7c35ef3 100644
--- a/drivers/input/keyboard/w90p910_keypad.c
+++ b/drivers/input/keyboard/w90p910_keypad.c
@@ -11,7 +11,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/device.h>
diff --git a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c
index d050d9d..7c2325b 100644
--- a/drivers/input/keyboard/xtkbd.c
+++ b/drivers/input/keyboard/xtkbd.c
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/input.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 
 #define DRIVER_DESC	"XT keyboard driver"
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 2e5d5e1..1f0ddfc 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -7,7 +7,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 1cb1da2..28a5bbe 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -8,7 +8,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/misc/atlas_btns.c b/drivers/input/misc/atlas_btns.c
index 5d44023..c0c5b63 100644
--- a/drivers/input/misc/atlas_btns.c
+++ b/drivers/input/misc/atlas_btns.c
@@ -25,7 +25,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/types.h>
 #include <asm/uaccess.h>
diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c
index cd139cb..370e929 100644
--- a/drivers/input/misc/bfin_rotary.c
+++ b/drivers/input/misc/bfin_rotary.c
@@ -6,7 +6,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/pm.h>
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c
index b5d71d2..3e11510 100644
--- a/drivers/input/misc/cobalt_btns.c
+++ b/drivers/input/misc/cobalt_btns.c
@@ -17,7 +17,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
-#include <linux/init.h>
 #include <linux/input-polldev.h>
 #include <linux/ioport.h>
 #include <linux/module.h>
diff --git a/drivers/input/misc/da9052_onkey.c b/drivers/input/misc/da9052_onkey.c
index 020569a..1f695f2 100644
--- a/drivers/input/misc/da9052_onkey.c
+++ b/drivers/input/misc/da9052_onkey.c
@@ -11,7 +11,6 @@
  * option) any later version.
  */
 
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index a0af8b2..4b11ede 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -11,7 +11,6 @@
  * option) any later version.
  */
 
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c
index a309a5c..0eba94f 100644
--- a/drivers/input/misc/dm355evm_keys.c
+++ b/drivers/input/misc/dm355evm_keys.c
@@ -9,7 +9,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/input/sparse-keymap.h>
diff --git a/drivers/input/misc/gpio_tilt_polled.c b/drivers/input/misc/gpio_tilt_polled.c
index 714c683..feeda2c 100644
--- a/drivers/input/misc/gpio_tilt_polled.c
+++ b/drivers/input/misc/gpio_tilt_polled.c
@@ -16,7 +16,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/input-polldev.h>
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c
index 290fa5f..01f3b5b 100644
--- a/drivers/input/misc/keyspan_remote.c
+++ b/drivers/input/misc/keyspan_remote.c
@@ -13,7 +13,6 @@
 
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/usb/input.h>
diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c
index e973133..1fea548 100644
--- a/drivers/input/misc/max8997_haptic.c
+++ b/drivers/input/misc/max8997_haptic.c
@@ -23,7 +23,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/err.h>
diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c
index d0277a7..0df6e8d 100644
--- a/drivers/input/misc/mc13783-pwrbutton.c
+++ b/drivers/input/misc/mc13783-pwrbutton.c
@@ -20,7 +20,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/input.h>
diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c
index 6983ffb..5e50513 100644
--- a/drivers/input/misc/mpu3050.c
+++ b/drivers/input/misc/mpu3050.c
@@ -30,7 +30,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/mutex.h>
diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c
index 40ac9a5..cd23036 100644
--- a/drivers/input/misc/pcap_keys.c
+++ b/drivers/input/misc/pcap_keys.c
@@ -12,7 +12,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c
index 73b13eb..db92f4f 100644
--- a/drivers/input/misc/pcf50633-input.c
+++ b/drivers/input/misc/pcf50633-input.c
@@ -16,7 +16,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c
index 0deca5a..97f711a 100644
--- a/drivers/input/misc/pcf8574_keypad.c
+++ b/drivers/input/misc/pcf8574_keypad.c
@@ -7,7 +7,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/i2c.h>
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index 7288b26..674a2cf 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -15,7 +15,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/i8253.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/platform_device.h>
 #include <linux/timex.h>
diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c
index ec086f6..1cb2aa5 100644
--- a/drivers/input/misc/pm8xxx-vibrator.c
+++ b/drivers/input/misc/pm8xxx-vibrator.c
@@ -11,7 +11,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c
index b49b738..7e05027 100644
--- a/drivers/input/misc/pmic8xxx-pwrkey.c
+++ b/drivers/input/misc/pmic8xxx-pwrkey.c
@@ -11,7 +11,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c
index 49c0c3e..63b539d 100644
--- a/drivers/input/misc/powermate.c
+++ b/drivers/input/misc/powermate.c
@@ -31,7 +31,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/usb/input.h>
 
diff --git a/drivers/input/misc/retu-pwrbutton.c b/drivers/input/misc/retu-pwrbutton.c
index 7ca09ba..4bff1aa 100644
--- a/drivers/input/misc/retu-pwrbutton.c
+++ b/drivers/input/misc/retu-pwrbutton.c
@@ -17,7 +17,6 @@
  */
 
 #include <linux/irq.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/input.h>
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index f920ba7..99b9e42 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -16,7 +16,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/device.h>
diff --git a/drivers/input/misc/sgi_btns.c b/drivers/input/misc/sgi_btns.c
index 95cf299..f104749 100644
--- a/drivers/input/misc/sgi_btns.c
+++ b/drivers/input/misc/sgi_btns.c
@@ -17,7 +17,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
-#include <linux/init.h>
 #include <linux/input-polldev.h>
 #include <linux/ioport.h>
 #include <linux/module.h>
diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c
index 7b8b03e..e8897c3 100644
--- a/drivers/input/misc/sirfsoc-onkey.c
+++ b/drivers/input/misc/sirfsoc-onkey.c
@@ -7,7 +7,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c
index caa2c406..173b6dc 100644
--- a/drivers/input/misc/wm831x-on.c
+++ b/drivers/input/misc/wm831x-on.c
@@ -18,7 +18,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 285a5bd..79c964c 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -47,7 +47,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/rwsem.h>
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index e42f1fa..800ca7d 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -30,7 +30,6 @@
 
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/usb/input.h>
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index a73f961..c329cdb 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -34,7 +34,6 @@
 
 #include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/usb/input.h>
diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
index a5869a8..87095e2 100644
--- a/drivers/input/mouse/cypress_ps2.c
+++ b/drivers/input/mouse/cypress_ps2.c
@@ -15,7 +15,6 @@
  * the Free Software Foundation.
  */
 
-#include <linux/init.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
index 6b44413..0d174e0f 100644
--- a/drivers/input/mouse/gpio_mouse.c
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -8,7 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/init.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/input-polldev.h>
diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c
index 0b8d335..1ccc88a 100644
--- a/drivers/input/mouse/navpoint.c
+++ b/drivers/input/mouse/navpoint.c
@@ -9,7 +9,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c
index 0ecb9e7..d77a7a7 100644
--- a/drivers/input/mouse/pxa930_trkball.c
+++ b/drivers/input/mouse/pxa930_trkball.c
@@ -10,7 +10,6 @@
  *  published by the Free Software Foundation.
  */
 
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c
index d5928fd..8df5266 100644
--- a/drivers/input/mouse/sermouse.c
+++ b/drivers/input/mouse/sermouse.c
@@ -32,7 +32,6 @@
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Serial mouse driver"
 
diff --git a/drivers/input/mouse/synaptics_usb.c b/drivers/input/mouse/synaptics_usb.c
index 64cf34e..e122bda 100644
--- a/drivers/input/mouse/synaptics_usb.c
+++ b/drivers/input/mouse/synaptics_usb.c
@@ -39,7 +39,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
index e900d46..3829823 100644
--- a/drivers/input/mouse/vsxxxaa.c
+++ b/drivers/input/mouse/vsxxxaa.c
@@ -82,7 +82,6 @@
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC "Driver for DEC VSXXX-AA and -GA mice and VSXXX-AB tablet"
 
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index 4777a73..cce69d6 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -12,7 +12,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 4e2fd44..3e3776c 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -10,7 +10,6 @@
  * (at your option) any later version.
  */
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c
index 07a8363..7551699 100644
--- a/drivers/input/serio/libps2.c
+++ b/drivers/input/serio/libps2.c
@@ -18,7 +18,6 @@
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/i8042.h>
-#include <linux/init.h>
 #include <linux/libps2.h>
 
 #define DRIVER_DESC	"PS/2 driver library"
diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
index 51b1d40..5d2fe7e 100644
--- a/drivers/input/serio/olpc_apsp.c
+++ b/drivers/input/serio/olpc_apsp.c
@@ -16,7 +16,6 @@
 
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
index 76f8383..1715965 100644
--- a/drivers/input/serio/pcips2.c
+++ b/drivers/input/serio/pcips2.c
@@ -16,7 +16,6 @@
 #include <linux/input.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/delay.h>
 #include <asm/io.h>
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c
index 7a65a1b..594256c 100644
--- a/drivers/input/serio/q40kbd.c
+++ b/drivers/input/serio/q40kbd.c
@@ -30,7 +30,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c
index 567566a..e462e77 100644
--- a/drivers/input/serio/rpckbd.c
+++ b/drivers/input/serio/rpckbd.c
@@ -29,7 +29,6 @@
 
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/serio.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 59df2e7..c9a02fe 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -15,7 +15,6 @@
 #include <linux/poll.h>
 #include <linux/module.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/device.h>
 #include <linux/miscdevice.h>
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index dfbcd87..e6cf52e 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -20,7 +20,6 @@
 #include <linux/interrupt.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/list.h>
 #include <linux/io.h>
 #include <linux/of_address.h>
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index e062ec8..889f6b7 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -28,7 +28,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/usb/input.h>
 
 /*
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index ee83c39..e7f966d 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -74,7 +74,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/usb/input.h>
 #include <asm/uaccess.h>
 #include <asm/unaligned.h>
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index 29e01ab..caecffe 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -53,7 +53,6 @@ Scott Hill shill@gtcocalcomp.com
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/usb.h>
diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c
index 5cc0412..cd85205 100644
--- a/drivers/input/tablet/hanwang.c
+++ b/drivers/input/tablet/hanwang.c
@@ -26,7 +26,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/usb/input.h>
 
 #define DRIVER_AUTHOR   "Xing Wei <weixing@hanwang.com.cn>"
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c
index 3fba74b..d2ac7c2 100644
--- a/drivers/input/tablet/kbtab.c
+++ b/drivers/input/tablet/kbtab.c
@@ -1,7 +1,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/usb/input.h>
 #include <asm/unaligned.h>
 
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index b79d451..9ebf0ed 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -86,7 +86,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
-#include <linux/init.h>
 #include <linux/usb/input.h>
 #include <linux/power_supply.h>
 #include <asm/unaligned.h>
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
index 69834dd..46ba8e1 100644
--- a/drivers/input/touchscreen/ad7877.c
+++ b/drivers/input/touchscreen/ad7877.c
@@ -37,7 +37,6 @@
 
 
 #include <linux/device.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index facd305..7d4cd43 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -22,7 +22,6 @@
  */
 
 #include <linux/device.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index ea19536..97f2895 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -19,7 +19,6 @@
  */
 #include <linux/types.h>
 #include <linux/hwmon.h>
-#include <linux/init.h>
 #include <linux/err.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 59aa240..4705560 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -12,7 +12,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/firmware.h>
 #include <linux/i2c.h>
diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c
index bddabc5..e539b01 100644
--- a/drivers/input/touchscreen/atmel_tsadcc.c
+++ b/drivers/input/touchscreen/atmel_tsadcc.c
@@ -12,7 +12,6 @@
  *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation.
  */
-#include <linux/init.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c
index 34ad841..61e9869 100644
--- a/drivers/input/touchscreen/da9034-ts.c
+++ b/drivers/input/touchscreen/da9034-ts.c
@@ -13,7 +13,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
diff --git a/drivers/input/touchscreen/dynapro.c b/drivers/input/touchscreen/dynapro.c
index 1809677..86237a9 100644
--- a/drivers/input/touchscreen/dynapro.c
+++ b/drivers/input/touchscreen/dynapro.c
@@ -24,7 +24,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Dynapro serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index 054d225..e6bcb13 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -18,7 +18,6 @@
 */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c
index 957423d..8051a4b 100644
--- a/drivers/input/touchscreen/elo.c
+++ b/drivers/input/touchscreen/elo.c
@@ -22,7 +22,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 #include <linux/ctype.h>
 
 #define DRIVER_DESC	"Elo serial touchscreen driver"
diff --git a/drivers/input/touchscreen/fujitsu_ts.c b/drivers/input/touchscreen/fujitsu_ts.c
index 10794dd..d0e46a7 100644
--- a/drivers/input/touchscreen/fujitsu_ts.c
+++ b/drivers/input/touchscreen/fujitsu_ts.c
@@ -16,7 +16,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Fujitsu serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c
index 41c7176..e2ee626 100644
--- a/drivers/input/touchscreen/gunze.c
+++ b/drivers/input/touchscreen/gunze.c
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Gunze AHL-51S touchscreen driver"
 
diff --git a/drivers/input/touchscreen/hampshire.c b/drivers/input/touchscreen/hampshire.c
index 0cc47ea..ecb1e0e 100644
--- a/drivers/input/touchscreen/hampshire.c
+++ b/drivers/input/touchscreen/hampshire.c
@@ -23,7 +23,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Hampshire serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/inexio.c b/drivers/input/touchscreen/inexio.c
index a29c99c..adb80b6 100644
--- a/drivers/input/touchscreen/inexio.c
+++ b/drivers/input/touchscreen/inexio.c
@@ -23,7 +23,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"iNexio serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c
index e30d837..4f6b156 100644
--- a/drivers/input/touchscreen/intel-mid-touch.c
+++ b/drivers/input/touchscreen/intel-mid-touch.c
@@ -27,7 +27,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c
index e463a79..7324c5c 100644
--- a/drivers/input/touchscreen/jornada720_ts.c
+++ b/drivers/input/touchscreen/jornada720_ts.c
@@ -14,7 +14,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c
index 9101ee5..2058253 100644
--- a/drivers/input/touchscreen/lpc32xx_ts.c
+++ b/drivers/input/touchscreen/lpc32xx_ts.c
@@ -15,7 +15,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <linux/init.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
index 7d2b213..0786010 100644
--- a/drivers/input/touchscreen/mainstone-wm97xx.c
+++ b/drivers/input/touchscreen/mainstone-wm97xx.c
@@ -25,7 +25,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/touchscreen/max11801_ts.c b/drivers/input/touchscreen/max11801_ts.c
index 9f84fcd..a68ec14 100644
--- a/drivers/input/touchscreen/max11801_ts.c
+++ b/drivers/input/touchscreen/max11801_ts.c
@@ -33,7 +33,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c
index f9f4e0c..baf371e 100644
--- a/drivers/input/touchscreen/mcs5000_ts.c
+++ b/drivers/input/touchscreen/mcs5000_ts.c
@@ -14,7 +14,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/i2c/mcs.h>
 #include <linux/interrupt.h>
diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c
index 1443532..8a598c0 100644
--- a/drivers/input/touchscreen/mms114.c
+++ b/drivers/input/touchscreen/mms114.c
@@ -8,7 +8,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/i2c.h>
diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c
index eb66b7c..9b5552a 100644
--- a/drivers/input/touchscreen/mtouch.c
+++ b/drivers/input/touchscreen/mtouch.c
@@ -21,7 +21,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"MicroTouch serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/pcap_ts.c b/drivers/input/touchscreen/pcap_ts.c
index f22e04d..cff2376 100644
--- a/drivers/input/touchscreen/pcap_ts.c
+++ b/drivers/input/touchscreen/pcap_ts.c
@@ -11,7 +11,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/string.h>
 #include <linux/slab.h>
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c
index b49f0b8..417d873 100644
--- a/drivers/input/touchscreen/penmount.c
+++ b/drivers/input/touchscreen/penmount.c
@@ -21,7 +21,6 @@
 #include <linux/input.h>
 #include <linux/input/mt.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"PenMount serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index b061af2..e2d109c 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -28,7 +28,6 @@
 #include <linux/module.h>
 #include <linux/gpio.h>
 #include <linux/input.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index 59e81b0..42ce31a 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -15,7 +15,6 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/init.h>
 #include <linux/device.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index 68beada..6c9cd12 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -14,7 +14,6 @@
  */
 
 
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/err.h>
 #include <linux/module.h>
diff --git a/drivers/input/touchscreen/touchit213.c b/drivers/input/touchscreen/touchit213.c
index 5f29e5b..c27cf8f 100644
--- a/drivers/input/touchscreen/touchit213.c
+++ b/drivers/input/touchscreen/touchit213.c
@@ -21,7 +21,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Sahara TouchIT-213 serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/touchright.c b/drivers/input/touchscreen/touchright.c
index 8a2887d..4000e52 100644
--- a/drivers/input/touchscreen/touchright.c
+++ b/drivers/input/touchscreen/touchright.c
@@ -20,7 +20,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Touchright serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/touchwin.c b/drivers/input/touchscreen/touchwin.c
index 588cdcb..ba90f44 100644
--- a/drivers/input/touchscreen/touchwin.c
+++ b/drivers/input/touchscreen/touchwin.c
@@ -27,7 +27,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define DRIVER_DESC	"Touchwindow serial touchscreen driver"
 
diff --git a/drivers/input/touchscreen/tsc40.c b/drivers/input/touchscreen/tsc40.c
index eb96f16..2968787 100644
--- a/drivers/input/touchscreen/tsc40.c
+++ b/drivers/input/touchscreen/tsc40.c
@@ -11,7 +11,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 
 #define PACKET_LENGTH  5
 struct tsc_ser {
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 1271f97..0926e96 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -19,7 +19,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 5f87bed..a096633 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -51,7 +51,6 @@
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/usb.h>
 #include <linux/usb/input.h>
 #include <linux/hid.h>
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index 9a83be6..2792ca3 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -18,7 +18,6 @@
 #include <linux/slab.h>
 #include <linux/input/mt.h>
 #include <linux/serio.h>
-#include <linux/init.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 
diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c
index 6be2eb6..1b953a0 100644
--- a/drivers/input/touchscreen/wm831x-ts.c
+++ b/drivers/input/touchscreen/wm831x-ts.c
@@ -13,7 +13,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/string.h>
 #include <linux/pm.h>
 #include <linux/input.h>
diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c
index bf0869a..e2ccd68 100644
--- a/drivers/input/touchscreen/zylonite-wm97xx.c
+++ b/drivers/input/touchscreen/zylonite-wm97xx.c
@@ -20,7 +20,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/irq.h>
-- 
1.8.4.1


^ permalink raw reply related

* Re: [PATCH] Input: cros_ec_keyb - avoid variable-length arrays on stack
From: Doug Anderson @ 2014-01-06 18:57 UTC (permalink / raw)
  To: Luigi Semenzato
  Cc: Dmitry Torokhov, linux-input, Simon Glass, Vincent Palatin,
	linux-kernel@vger.kernel.org, Olof Johansson
In-Reply-To: <CAA25o9ScgzY1TbqKoe2KbSCc-DUBFLstDyYWY=LmdL+ioX82Ug@mail.gmail.com>

On Thu, Jan 2, 2014 at 4:25 PM, Luigi Semenzato <semenzato@chromium.org> wrote:
> On Thu, Jan 2, 2014 at 11:48 AM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>> Hi Doug,
>>
>> On Thu, Jan 02, 2014 at 09:40:44AM -0800, Doug Anderson wrote:
>>> Dmitry,
>>>
>>> Thanks for cleaning up cros_eckeyb.  :)  I'm a little curious about
>>> the motivation here.  I can't imagine a keyboard with all that many
>>> columns (ours has 13), so it's really not taking a whole lot off of
>>> the stack.  Are you trying to make some sort of automated checker
>>> happy, or just generally trying to keep the kernel consistent?
>>
>> I compile most of the code with sparse so I prefer to keep it happy.
>>
>>>
>>> In any case, I'm not opposed to moving these bytes off the stack.
>>> Comments below, though...
>>>
>>> ---
>>>
>>> On Tue, Dec 31, 2013 at 11:35 AM, Dmitry Torokhov
>>> <dmitry.torokhov@gmail.com> wrote:
...
>>> > @@ -217,32 +219,40 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
>>> >         struct cros_ec_keyb *ckdev;
>>> >         struct input_dev *idev;
>>> >         struct device_node *np;
>>> > +       unsigned int rows, cols;
>>> > +       size_t size;
>>> >         int err;
>>> >
>>> >         np = pdev->dev.of_node;
>>> >         if (!np)
>>> >                 return -ENODEV;
>>> >
>>> > -       ckdev = devm_kzalloc(&pdev->dev, sizeof(*ckdev), GFP_KERNEL);
>>> > -       if (!ckdev)
>>> > -               return -ENOMEM;
>>> > -       err = matrix_keypad_parse_of_params(&pdev->dev, &ckdev->rows,
>>> > -                                           &ckdev->cols);
>>> > +       err = matrix_keypad_parse_of_params(&pdev->dev, &rows, &cols);
>>> >         if (err)
>>> >                 return err;
>>> > -       ckdev->old_kb_state = devm_kzalloc(&pdev->dev, ckdev->cols, GFP_KERNEL);
>>> > -       if (!ckdev->old_kb_state)
>>> > -               return -ENOMEM;
>>> >
>>> > -       idev = devm_input_allocate_device(&pdev->dev);
>>> > -       if (!idev)
>>> > +       /*
>>> > +        * Double memory for keyboard state so we have space for storing
>>> > +        * current and previous state.
>>> > +        */
>>> > +       size = sizeof(*ckdev) + 2 * cols * sizeof(*ckdev->kb_state);
>>> > +       ckdev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
>>> > +       if (!ckdev)
>>> >                 return -ENOMEM;
>>>
>>> This change seems like a lot of complexity to save one memory
>>> allocation.  If you insist, I'd be OK with having one allocation for
>>> both buffers (kb_state and old_kb_state) but trying to jam this onto
>>> the end of the structure is non-obvious.  It certainly took me a
>>> minute to understand what you were doing and why.
>>
>> It is not one additional allocation but more as you need to allocate
>> devres data structures and add them there. I think we have quite a few
>> drivers piggy-backing key tables at the end of data structures.

OK, I will leave this as your call.  To me, piggybacking like this
make sense if you've got a single chunk of dynamic memory that you
just want to cram onto the end of the structure.  It just gets more
complicated when you have two nearly identical chunks of memory and
one of them is using this piggybacking technique while the other
isn't.

What about a compromise and declaring as:

 u8 *kb_state;
 u8 *old_kb_state;
 u8 buffers[];

You still have the same number of memory allocations but (to me) it's
much clearer what's going on here.  You do pay a penalty of an extra
memory dereference and an extra 4 bytes of memory, but clarity should
trump that.

-Doug

^ permalink raw reply

* [PATCH] Input: ALPS - Recognise "Dolphin V2" touchpads
From: Chris Diamand @ 2014-01-06 20:10 UTC (permalink / raw)
  To: dmitry.torokhov, cernekee, yunkang.tang, dturvene
  Cc: linux-input, Chris Diamand

This is the touchpad used on the Dell Vostro 3360. Without
this change, the driver reports this as follows:

psmouse serio1: alps: Unknown ALPS touchpad: E7=73 03 50, EC=73 02 02

It seems to use the ALPS V5 protocol, so identify it
as such by allowing ec[1] == 0x02.

This is based on src/alps.c from the DKMS driver here:
http://www.dahetral.com/public-download/alps-psmouse-dlkm-for-3-2-and-3-5/

Signed-off-by: Chris Diamand <chris@diamand.org>
---
 drivers/input/mouse/alps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 5cf62e3..d5d15eb 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1845,7 +1845,7 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
 	if (alps_match_table(psmouse, priv, e7, ec) == 0) {
 		return 0;
 	} else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 &&
-		   ec[0] == 0x73 && ec[1] == 0x01) {
+		   ec[0] == 0x73 && (ec[1] == 0x01 || ec[1] == 0x02)) {
 		priv->proto_version = ALPS_PROTO_V5;
 		alps_set_defaults(priv);
 
-- 
1.8.5.2


^ permalink raw reply related

* Re: [PATCH] Input: cros_ec_keyb - avoid variable-length arrays on stack
From: Dmitry Torokhov @ 2014-01-06 22:12 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Luigi Semenzato, linux-input, Simon Glass, Vincent Palatin,
	linux-kernel@vger.kernel.org, Olof Johansson
In-Reply-To: <CAD=FV=UCEcTr+X-=yNxo1VnJ1B8kJ=wDbR7H_S3AYvBGLU7tEw@mail.gmail.com>

On Mon, Jan 06, 2014 at 10:57:14AM -0800, Doug Anderson wrote:
> On Thu, Jan 2, 2014 at 4:25 PM, Luigi Semenzato <semenzato@chromium.org> wrote:
> > On Thu, Jan 2, 2014 at 11:48 AM, Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> >> Hi Doug,
> >>
> >> On Thu, Jan 02, 2014 at 09:40:44AM -0800, Doug Anderson wrote:
> >>> Dmitry,
> >>>
> >>> Thanks for cleaning up cros_eckeyb.  :)  I'm a little curious about
> >>> the motivation here.  I can't imagine a keyboard with all that many
> >>> columns (ours has 13), so it's really not taking a whole lot off of
> >>> the stack.  Are you trying to make some sort of automated checker
> >>> happy, or just generally trying to keep the kernel consistent?
> >>
> >> I compile most of the code with sparse so I prefer to keep it happy.
> >>
> >>>
> >>> In any case, I'm not opposed to moving these bytes off the stack.
> >>> Comments below, though...
> >>>
> >>> ---
> >>>
> >>> On Tue, Dec 31, 2013 at 11:35 AM, Dmitry Torokhov
> >>> <dmitry.torokhov@gmail.com> wrote:
> ...
> >>> > @@ -217,32 +219,40 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
> >>> >         struct cros_ec_keyb *ckdev;
> >>> >         struct input_dev *idev;
> >>> >         struct device_node *np;
> >>> > +       unsigned int rows, cols;
> >>> > +       size_t size;
> >>> >         int err;
> >>> >
> >>> >         np = pdev->dev.of_node;
> >>> >         if (!np)
> >>> >                 return -ENODEV;
> >>> >
> >>> > -       ckdev = devm_kzalloc(&pdev->dev, sizeof(*ckdev), GFP_KERNEL);
> >>> > -       if (!ckdev)
> >>> > -               return -ENOMEM;
> >>> > -       err = matrix_keypad_parse_of_params(&pdev->dev, &ckdev->rows,
> >>> > -                                           &ckdev->cols);
> >>> > +       err = matrix_keypad_parse_of_params(&pdev->dev, &rows, &cols);
> >>> >         if (err)
> >>> >                 return err;
> >>> > -       ckdev->old_kb_state = devm_kzalloc(&pdev->dev, ckdev->cols, GFP_KERNEL);
> >>> > -       if (!ckdev->old_kb_state)
> >>> > -               return -ENOMEM;
> >>> >
> >>> > -       idev = devm_input_allocate_device(&pdev->dev);
> >>> > -       if (!idev)
> >>> > +       /*
> >>> > +        * Double memory for keyboard state so we have space for storing
> >>> > +        * current and previous state.
> >>> > +        */
> >>> > +       size = sizeof(*ckdev) + 2 * cols * sizeof(*ckdev->kb_state);
> >>> > +       ckdev = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
> >>> > +       if (!ckdev)
> >>> >                 return -ENOMEM;
> >>>
> >>> This change seems like a lot of complexity to save one memory
> >>> allocation.  If you insist, I'd be OK with having one allocation for
> >>> both buffers (kb_state and old_kb_state) but trying to jam this onto
> >>> the end of the structure is non-obvious.  It certainly took me a
> >>> minute to understand what you were doing and why.
> >>
> >> It is not one additional allocation but more as you need to allocate
> >> devres data structures and add them there. I think we have quite a few
> >> drivers piggy-backing key tables at the end of data structures.
> 
> OK, I will leave this as your call.  To me, piggybacking like this
> make sense if you've got a single chunk of dynamic memory that you
> just want to cram onto the end of the structure.  It just gets more
> complicated when you have two nearly identical chunks of memory and
> one of them is using this piggybacking technique while the other
> isn't.
> 
> What about a compromise and declaring as:
> 
>  u8 *kb_state;
>  u8 *old_kb_state;
>  u8 buffers[];
> 
> You still have the same number of memory allocations but (to me) it's
> much clearer what's going on here.  You do pay a penalty of an extra
> memory dereference and an extra 4 bytes of memory, but clarity should
> trump that.

OK, I can do that.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: 'Sebastian Reichel' @ 2014-01-06 22:14 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Dmitry Torokhov', linux-input, 'Fugang Duan',
	'Peter Ujfalusi', ".linux-kernel"
In-Reply-To: <009301cf0a8a$1963cfd0$4c2b6f70$%han@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On Mon, Jan 06, 2014 at 11:50:46AM +0900, Jingoo Han wrote:
> If you repeat at least twice insmod & rmmod 'twl4030_keypad.ko',
> it will be good. If there are some bugs, it will make the error
> messages or kernel panic.

I tried load & unloading the twl4030_keypad module multiple times.
I didn't get any error messages or kernel panics. Everything seems
to behave correctly.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH v2 02/10] genirq: Add devm_request_any_context_irq()
From: Stephen Boyd @ 2014-01-06 22:24 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Dmitry Torokhov, linux-kernel, linux-arm-msm, linux-arm-kernel,
	linux-input
In-Reply-To: <1388709460-19222-3-git-send-email-sboyd@codeaurora.org>

On 01/02/14 16:37, Stephen Boyd wrote:
> Some drivers use request_any_context_irq() but there isn't a
> devm_* function for it. Add one so that these drivers don't need
> to explicitly free the irq on driver detach.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Thomas, can you please review this patch?

> ---
>  include/linux/interrupt.h |  5 +++++
>  kernel/irq/devres.c       | 45 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+)
>
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 0053adde0ed9..a2678d35b5a2 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -158,6 +158,11 @@ devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler,
>  					 devname, dev_id);
>  }
>  
> +extern int __must_check
> +devm_request_any_context_irq(struct device *dev, unsigned int irq,
> +		 irq_handler_t handler, unsigned long irqflags,
> +		 const char *devname, void *dev_id);
> +
>  extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
>  
>  /*
> diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
> index bd8e788d71e0..1ef0606797c9 100644
> --- a/kernel/irq/devres.c
> +++ b/kernel/irq/devres.c
> @@ -73,6 +73,51 @@ int devm_request_threaded_irq(struct device *dev, unsigned int irq,
>  EXPORT_SYMBOL(devm_request_threaded_irq);
>  
>  /**
> + *	devm_request_any_context_irq - allocate an interrupt line for a managed device
> + *	@dev: device to request interrupt for
> + *	@irq: Interrupt line to allocate
> + *	@handler: Function to be called when the IRQ occurs
> + *	@thread_fn: function to be called in a threaded interrupt context. NULL
> + *		    for devices which handle everything in @handler
> + *	@irqflags: Interrupt type flags
> + *	@devname: An ascii name for the claiming device
> + *	@dev_id: A cookie passed back to the handler function
> + *
> + *	Except for the extra @dev argument, this function takes the
> + *	same arguments and performs the same function as
> + *	request_any_context_irq().  IRQs requested with this function will be
> + *	automatically freed on driver detach.
> + *
> + *	If an IRQ allocated with this function needs to be freed
> + *	separately, devm_free_irq() must be used.
> + */
> +int devm_request_any_context_irq(struct device *dev, unsigned int irq,
> +			      irq_handler_t handler, unsigned long irqflags,
> +			      const char *devname, void *dev_id)
> +{
> +	struct irq_devres *dr;
> +	int rc;
> +
> +	dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres),
> +			  GFP_KERNEL);
> +	if (!dr)
> +		return -ENOMEM;
> +
> +	rc = request_any_context_irq(irq, handler, irqflags, devname, dev_id);
> +	if (rc) {
> +		devres_free(dr);
> +		return rc;
> +	}
> +
> +	dr->irq = irq;
> +	dr->dev_id = dev_id;
> +	devres_add(dev, dr);
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL(devm_request_any_context_irq);
> +
> +/**
>   *	devm_free_irq - free an interrupt
>   *	@dev: device to free interrupt for
>   *	@irq: Interrupt line to free

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: Jingoo Han @ 2014-01-07  0:35 UTC (permalink / raw)
  To: 'Dmitry Torokhov'
  Cc: 'Sebastian Reichel', linux-input, 'Fugang Duan',
	'Peter Ujfalusi', ".linux-kernel",
	'Jingoo Han'
In-Reply-To: <20140106180705.GB2754@core.coreip.homeip.net>

On Tuesday, January 07, 2014 3:07 AM, Dmitry Torokhov wrote:
> On Mon, Jan 06, 2014 at 11:25:54AM +0900, Jingoo Han wrote:
> > On Saturday, January 04, 2014 6:02 PM, Dmitry Torokhov wrote:
> > >
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > >
> > > Compile-tested only.
> > >
> > >
> > >  drivers/input/keyboard/twl4030_keypad.c | 70 +++++++++++----------------------
> > >  1 file changed, 22 insertions(+), 48 deletions(-)
> > >
> > > diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
> > > index f663c19..71eb041 100644
> > > --- a/drivers/input/keyboard/twl4030_keypad.c
> > > +++ b/drivers/input/keyboard/twl4030_keypad.c
> >
> > [.....]
> >
> > > -static int twl4030_kp_remove(struct platform_device *pdev)
> > > -{
> > > -	struct twl4030_keypad *kp = platform_get_drvdata(pdev);
> > > -
> > > -	free_irq(kp->irq, kp);
> > > -	input_unregister_device(kp->input);
> >
> > Hi Dmitry Torokhov,
> >
> > IMHO, input_unregister_device() seems to be necessary,
> > because input_register_device() is still used.
> > If I am wrong, please let me know kindly.
> 
> No, input_unregister_device() is not needed (although it can be used)
> with managed input devices (ones that are allocated with
> devm_input_allocate_device()) because input_register_device() will
> automatically insert devres entry for such devices. So for managed input
> devices that were registered with input subsystem there are 2 separate
> devres entries: one for unregistering the device and another is to
> finally release all resources. If you had a sequence:
> 
> 	devm_kzalloc(...);
> 	devm_input_allocate_device(...);
> 	devm_devm_ioremap_resource(...);
> 	devm_request_irq(...);
> 	input_register_device(...);
> 
> then unwind sequence will be:
> 
> 	unregister input device (but input device structure is still
> 		present in memory and input_event() can be called, but
> 		events won't be delivered anywhere - that is done so
> 		that we can survive releasing IRQs after unregistering
> 		managed input device)
> 	free IRQ
> 	release resources
> 	free input device structure
> 	free kzalloc memory
> 
> Hope this helps.

Oh, I really appreciate your detailed and kind comments. :-)

I checked the following. As you said, input_register_device()
automatically inserts devres entry.

./drivers/input/input.c
int input_register_device(struct input_dev *dev)
{
        struct input_devres *devres = NULL;
        struct input_handler *handler;
        unsigned int packet_size;
        const char *path;
        int error;

        if (dev->devres_managed) {
                devres = devres_alloc(devm_input_device_unregister,
                                      sizeof(struct input_devres), GFP_KERNEL);

Thank you so much.

Best regards,
Jingoo Han


^ permalink raw reply

* Re: [PATCH] Input: twl4030 - convert to using managed resources
From: Jingoo Han @ 2014-01-07  0:38 UTC (permalink / raw)
  To: 'Sebastian Reichel'
  Cc: 'Dmitry Torokhov', linux-input, 'Fugang Duan',
	'Peter Ujfalusi', ".linux-kernel",
	'Jingoo Han'
In-Reply-To: <20140106221405.GA22325@earth.universe>

On Tuesday, January 07, 2014 7:14 AM, Sebastian Reichel wrote:
> On Mon, Jan 06, 2014 at 11:50:46AM +0900, Jingoo Han wrote:
> > If you repeat at least twice insmod & rmmod 'twl4030_keypad.ko',
> > it will be good. If there are some bugs, it will make the error
> > messages or kernel panic.
> 
> I tried load & unloading the twl4030_keypad module multiple times.
> I didn't get any error messages or kernel panics. Everything seems
> to behave correctly.

Thank you for your testing. :-)
I checked the sequence; it looks good.
See you later.

Best regards,
Jingoo Han



^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox