hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/mux/adgs1408.c
....@@ -6,9 +6,9 @@
66 */
77
88 #include <linux/err.h>
9
+#include <linux/mod_devicetable.h>
910 #include <linux/module.h>
1011 #include <linux/mux/driver.h>
11
-#include <linux/of_platform.h>
1212 #include <linux/property.h>
1313 #include <linux/spi/spi.h>
1414
....@@ -59,7 +59,7 @@
5959 s32 idle_state;
6060 int ret;
6161
62
- chip_id = (enum adgs1408_chip_id)of_device_get_match_data(dev);
62
+ chip_id = (enum adgs1408_chip_id)device_get_match_data(dev);
6363 if (!chip_id)
6464 chip_id = spi_get_device_id(spi)->driver_data;
6565
....@@ -93,7 +93,7 @@
9393 mux->idle_state = idle_state;
9494 break;
9595 }
96
- /* fall through */
96
+ fallthrough;
9797 default:
9898 dev_err(dev, "invalid idle-state %d\n", idle_state);
9999 return -EINVAL;
....@@ -119,7 +119,7 @@
119119 static struct spi_driver adgs1408_driver = {
120120 .driver = {
121121 .name = "adgs1408",
122
- .of_match_table = of_match_ptr(adgs1408_of_match),
122
+ .of_match_table = adgs1408_of_match,
123123 },
124124 .probe = adgs1408_probe,
125125 .id_table = adgs1408_spi_id,