<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/input/serio/serio_raw.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2014-12-03T23:27:17Z</updated>
<entry>
<title>Input: initialize device counter variables with -1</title>
<updated>2014-12-03T23:27:17Z</updated>
<author>
<name>Aniroop Mathur</name>
<email>aniroop.mathur@gmail.com</email>
</author>
<published>2014-12-03T22:27:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=939ffb1712890ee22146d2dfc24adbc7da6afa84'/>
<id>urn:sha1:939ffb1712890ee22146d2dfc24adbc7da6afa84</id>
<content type='text'>
Let's initialize atomic_t variables keeping track of number of various
devices created so far with -1 in order to avoid extra subtraction
operation.

Signed-off-by: Aniroop Mathur &lt;aniroop.mathur@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-07T07:23:57Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-06T18:27:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf9a9f8e5105b13cea954b254008f383ed0b4045'/>
<id>urn:sha1:bf9a9f8e5105b13cea954b254008f383ed0b4045</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  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 &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - signal EFAULT even if read/write partially succeeds</title>
<updated>2012-05-02T07:21:13Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-05-02T07:13:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=46f49b7a223ac7493e7cf619fb583d11edefc2c2'/>
<id>urn:sha1:46f49b7a223ac7493e7cf619fb583d11edefc2c2</id>
<content type='text'>
When copy_to/from_user fails in the middle of transfer we should not
report to the user that read/write partially succeeded but rather
report -EFAULT right away, so that application will know that it got
its buffers all wrong.

If application messed up its buffers we can't trust the data fetched
from userspace and successfully written to the device or if data read
from the device and transferred to userspace ended up where application
expected it to end.

If serio_write() fails we still going to report partial writes if failure
happens in the middle of the transfer.

This is basically a revert of 7a0a27d2ce38aee19a31fee8c12095f586eed393
and 4fa0771138d0b56fe59ab8ab3b1ce9e594484362.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - ensure we don't block in non-blocking read</title>
<updated>2012-04-21T06:11:01Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-04-21T05:33:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=486c8aba39e5f194519cd5c0e85e5d1de8b74b03'/>
<id>urn:sha1:486c8aba39e5f194519cd5c0e85e5d1de8b74b03</id>
<content type='text'>
Avoid calling wait_event_interruptible() if client requested non-blocking
read, since it is not guaranteed that another thread will not consume
event after we checked if serio_raw-&gt;head != serio_raw-&gt;tail.

Also ensure we do not return 0 but keep waiting instead in blocking case,
when another thread steals "our" byte.

Reviewed-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Reviewed-by: Che-Liang Chiou &lt;clchiou@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio - use module_serio_driver</title>
<updated>2012-04-04T16:25:43Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-04-04T06:50:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=65ac9f7a23c934ee8c40dc20955e75db4924bfea'/>
<id>urn:sha1:65ac9f7a23c934ee8c40dc20955e75db4924bfea</id>
<content type='text'>
This patch converts the drivers in drivers/input/* to use
module_serio_driver() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - return proper result when serio_raw_read fails</title>
<updated>2012-02-01T17:26:18Z</updated>
<author>
<name>Che-Liang Chiou</name>
<email>clchiou@chromium.org</email>
</author>
<published>2012-02-01T17:25:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a0a27d2ce38aee19a31fee8c12095f586eed393'/>
<id>urn:sha1:7a0a27d2ce38aee19a31fee8c12095f586eed393</id>
<content type='text'>
serio_raw_read now returns (sometimes partially) successful number of
bytes transferred to the caller, and only returns error code to the
caller on completely failed transfers.

Signed-off-by: Che-Liang Chiou &lt;clchiou@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - return proper result when serio_raw_write fails</title>
<updated>2012-01-11T07:13:57Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-01-10T08:45:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4fa0771138d0b56fe59ab8ab3b1ce9e594484362'/>
<id>urn:sha1:4fa0771138d0b56fe59ab8ab3b1ce9e594484362</id>
<content type='text'>
If serio_raw_write was always returning number of bytes successfully
sent to serio port and never signalled error condition to the caller.
Change it so that for completely failed transfers appropriate error
code returned to the caller (partially successful writes still return
number of bytes transferred).

Reported-by: Che-liang Chiou &lt;clchiou@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - really signal HUP upon disconnect</title>
<updated>2012-01-11T07:13:21Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-01-10T08:45:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c62fbf6009fa338bd28bdcb14efbfc5fc0c579b'/>
<id>urn:sha1:0c62fbf6009fa338bd28bdcb14efbfc5fc0c579b</id>
<content type='text'>
Commit 8c1c10d5706bbb3b41cb4a5578339d67d3eeffc2 attempted to signal
POLLHUP | POLLERR condition when polling disconnected device,
unfortunately it did not do it quite correctly.

Reported-by: Che-Liang Chiou &lt;clchiou@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - remove stray semicolon</title>
<updated>2012-01-11T07:13:00Z</updated>
<author>
<name>Che-Liang Chiou</name>
<email>clchiou@chromium.org</email>
</author>
<published>2012-01-10T08:45:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d89c9bcb33909568905ec9c4b44a18cd8bd88aaa'/>
<id>urn:sha1:d89c9bcb33909568905ec9c4b44a18cd8bd88aaa</id>
<content type='text'>
Signed-off-by: Che-Liang Chiou &lt;clchiou@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: serio_raw - fix memory leak when closing char device</title>
<updated>2011-10-11T01:35:23Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2011-10-11T01:31:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=550eca7cafa1c6e2c077afb2211a364a982d8645'/>
<id>urn:sha1:550eca7cafa1c6e2c077afb2211a364a982d8645</id>
<content type='text'>
Apparently we never freed memory allocated when users open our char
devices nor removed old users from the list of connected clients.

Also unregister misc device immediately upon disconnecting the port
instead of waiting until last user drops off (refcounting in misc
device code will make sure needed pieces stay around while they
are needed) and make sure we are not holing holding serio_raw_mutex
when registering/unregistering misc device. This should fix potential
deadlock between serio_raw and misc device code uncovered by lockdep
and reported by Thomas Tuttle.

Reviewed-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
</feed>
