#include <linux/jiffies.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
+#include <linux/property.h>
#define DRIVER_NAME "tmp102"
if (!tmp102)
return -ENOMEM;
- of_property_read_string(dev->of_node, "label", &tmp102->label);
+ device_property_read_string(dev, "label", &tmp102->label);
i2c_set_clientdata(client, tmp102);
};
MODULE_DEVICE_TABLE(i2c, tmp102_id);
-static const struct of_device_id __maybe_unused tmp102_of_match[] = {
+static const struct of_device_id tmp102_of_match[] = {
{ .compatible = "ti,tmp102" },
{ },
};
static struct i2c_driver tmp102_driver = {
.driver.name = DRIVER_NAME,
- .driver.of_match_table = of_match_ptr(tmp102_of_match),
+ .driver.of_match_table = tmp102_of_match,
.driver.pm = pm_sleep_ptr(&tmp102_dev_pm_ops),
.probe = tmp102_probe,
.id_table = tmp102_id,