<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/input/touchscreen/usbtouchscreen.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-16T01:07:39+00:00</updated>
<entry>
<title>Input: usbtouchscreen - switch to using __free() cleanup facility</title>
<updated>2024-07-16T01:07:39+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d04f939352ba70104adccf92691f9e971c309544'/>
<id>urn:sha1:d04f939352ba70104adccf92691f9e971c309544</id>
<content type='text'>
Use __free(kfree) cleanup facility when allocating temporary buffers
for USB transfers.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - use guard notation when acquiring mutexes</title>
<updated>2024-07-16T01:07:39+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f784adb66df7582316fe24f9507fc1f5d4d635b4'/>
<id>urn:sha1:f784adb66df7582316fe24f9507fc1f5d4d635b4</id>
<content type='text'>
This makes the code more compact and error handling more robust.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-7-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - split device info table into individual pieces</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f787df1ac447e13ede6022061ecc2903afec26e'/>
<id>urn:sha1:7f787df1ac447e13ede6022061ecc2903afec26e</id>
<content type='text'>
Instead of using a single table containing information about various
touchscreens and enums to match the driver ID table data with chip
information define individual per-protocol instances of
usbtouch_device_info structure and reference them directly from
the usbtouch_devices ID table. This is simpler, safer, and uses less
memory in case some protocols are disabled.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-6-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - constify usbtouch_dev_info table</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=830f06c01789e1da6d8e7a92b9cf50dc14610181'/>
<id>urn:sha1:830f06c01789e1da6d8e7a92b9cf50dc14610181</id>
<content type='text'>
The data in this table is shared between all instances of the
touchscreens so it should not be modified.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - move process_pkt() into main device structure</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fbb1c92282fac71b07ec59c5501d4b7751f5d48d'/>
<id>urn:sha1:fbb1c92282fac71b07ec59c5501d4b7751f5d48d</id>
<content type='text'>
In preparation of splitting big usbtouch_dev_info table into separate
per-protocol structures and constifying them move process_pkt() from the
device info into main drvice structure and set it up in probe().
We can derive if we should use single- or multi-packet handling based
on presence of get_pkt_len() method.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - move the driver ID table</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca95a47e29b2f9455c6673a9daeead437e940a7d'/>
<id>urn:sha1:ca95a47e29b2f9455c6673a9daeead437e940a7d</id>
<content type='text'>
Move the driver's ID table closer to where it is used in preparation
to it using pointers to device info/parameters instead of device type
enum.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - remove custom USB_DEVICE_HID_CLASS macro</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f2feb06142c08b9b89bc1763247824bee0e00b4'/>
<id>urn:sha1:9f2feb06142c08b9b89bc1763247824bee0e00b4</id>
<content type='text'>
There already exists perfectly suitable USB_DEVICE_INTERFACE_CLASS
macro, use it.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: usbtouchscreen - use driver core to instantiate device attributes</title>
<updated>2024-07-16T01:07:38+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-12T05:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6797e19d9aa4b0cf134a2b4ccf4db8005cda35cf'/>
<id>urn:sha1:6797e19d9aa4b0cf134a2b4ccf4db8005cda35cf</id>
<content type='text'>
Instead of manually creating driver-specific device attributes
set struct usb_driver-&gt;dev_groups pointer to have the driver core
do it.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20240712051851.3463657-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: touchscreen - use sizeof(*pointer) instead of sizeof(type)</title>
<updated>2024-06-09T21:38:38+00:00</updated>
<author>
<name>Erick Archer</name>
<email>erick.archer@outlook.com</email>
</author>
<published>2024-06-08T14:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f81d03d43965261056d963572d0335645008a8e8'/>
<id>urn:sha1:f81d03d43965261056d963572d0335645008a8e8</id>
<content type='text'>
It is preferred to use sizeof(*pointer) instead of sizeof(type)
due to the type of the variable can change and one needs not
change the former (unlike the latter).

The refactoring is mostly trivial except for "usbtouchscreen.c"
file. Here, in the "mtouch_alloc" and "nexio_alloc" functions,
it is necessary to use a variable with a predefined type instead
of the "usbtouch-&gt;priv" variable (void * type). This way, the
"sizeof" operator can now know the correct size. Moreover, we
need to set the "usbtouch-&gt;priv" pointer after the memory
allocation since now the "kmalloc" return value is not assigned
directly.

This patch has no effect on runtime behavior.

Signed-off-by: Erick Archer &lt;erick.archer@outlook.com&gt;
Link: https://lore.kernel.org/r/AS8PR02MB723708364CC0DF2EAAFEE5968BC42@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: touchscreen - use sysfs_emit[_at]() instead of scnprintf()</title>
<updated>2023-12-14T05:26:11+00:00</updated>
<author>
<name>ye xingchen</name>
<email>ye.xingchen@zte.com.cn</email>
</author>
<published>2023-12-13T05:53:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e50389f208daf1d60810e789b8860063e3256693'/>
<id>urn:sha1:e50389f208daf1d60810e789b8860063e3256693</id>
<content type='text'>
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.

Signed-off-by: ye xingchen &lt;ye.xingchen@zte.com.cn&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Oliver Graute &lt;oliver.graute@kococonnector.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
