hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/iio/light/max44009.c
....@@ -528,6 +528,12 @@
528528 return devm_iio_device_register(&client->dev, indio_dev);
529529 }
530530
531
+static const struct of_device_id max44009_of_match[] = {
532
+ { .compatible = "maxim,max44009" },
533
+ { }
534
+};
535
+MODULE_DEVICE_TABLE(of, max44009_of_match);
536
+
531537 static const struct i2c_device_id max44009_id[] = {
532538 { "max44009", 0 },
533539 { }
....@@ -537,17 +543,12 @@
537543 static struct i2c_driver max44009_driver = {
538544 .driver = {
539545 .name = MAX44009_DRV_NAME,
546
+ .of_match_table = max44009_of_match,
540547 },
541548 .probe = max44009_probe,
542549 .id_table = max44009_id,
543550 };
544551 module_i2c_driver(max44009_driver);
545
-
546
-static const struct of_device_id max44009_of_match[] = {
547
- { .compatible = "maxim,max44009" },
548
- { }
549
-};
550
-MODULE_DEVICE_TABLE(of, max44009_of_match);
551552
552553 MODULE_AUTHOR("Robert Eshleman <bobbyeshleman@gmail.com>");
553554 MODULE_LICENSE("GPL v2");