Re: [PATCH v5 08/11] HID: spi-hid: add device tree support for HID over SPI

From
Jingyuan Liang <hidden>
Date
2026-10-13 22:26:15
Also in
linux-devicetree, linux-doc, linux-spi, linux-trace-kernel, lkml
Reply to
Uwe Kleine-König, 2026-10-12
On Mon, Oct 12, 2026 at 5:49 AM Uwe Kleine-König
[off-list ref] wrote:
Hello,

On Fri, Oct 09, 2026 at 10:25:33PM +0000, Jingyuan Liang wrote:
quoted
+#include <linux/mod_devicetable.h>
[...]
+#include <linux/spi/spi.h>
Drop <linux/mod_devicetable.h>, the spi header already provides the
needed *_device_id with less dependencies.
Thank you. I will drop it in v6.
quoted
+static const struct of_device_id spi_hid_of_match[] = {
+     { .compatible = "hid-over-spi", .data = &timing_data },
+     {}
{ } please
Will fix it in v6.
quoted
+};
+MODULE_DEVICE_TABLE(of, spi_hid_of_match);
+
+static const struct spi_device_id spi_hid_of_id_table[] = {
+     { "hid", 0 },
+     { "hid-over-spi", 0 },
+     { }
+};
Please use named initializers and drop the unused zeros.
Thank you. Will fix it in v6.
quoted
+MODULE_DEVICE_TABLE(spi, spi_hid_of_id_table);
+
+static struct spi_driver spi_hid_of_driver = {
+     .driver = {
+             .name   = "spi_hid_of",
+             .owner  = THIS_MODULE,
+             .of_match_table = spi_hid_of_match,
+             .probe_type = PROBE_PREFER_ASYNCHRONOUS,
+             .dev_groups = spi_hid_groups,
+     },
+     .probe          = spi_hid_of_probe,
+     .remove         = spi_hid_core_remove,
+     .id_table       = spi_hid_of_id_table,
Very inconsistent alignment of =, if you ask me, just use a single space
before a =.
Will do in v6, thanks.
quoted
+};
Best regards
Uwe
Thread (56 messages) 56 messages, 6 authors, last reply 18h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help