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