diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c index 5101d30ed9c6..31cf9e3bb04f 100644 --- a/drivers/hwmon/adt7462.c +++ b/drivers/hwmon/adt7462.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1814,10 +1815,17 @@ static const struct i2c_device_id adt7462_id[] = { }; MODULE_DEVICE_TABLE(i2c, adt7462_id); +static const struct of_device_id adt7462_of_match[] = { + { .compatible = "onnn,adt7462" }, + { }, +}; +MODULE_DEVICE_TABLE(of, adt7462_of_match); + static struct i2c_driver adt7462_driver = { .class = I2C_CLASS_HWMON, .driver = { .name = "adt7462", + .of_match_table = adt7462_of_match, }, .probe = adt7462_probe, .id_table = adt7462_id,