static int adv7180_probe(struct i2c_client *client)
 {
-       const struct i2c_device_id *id = i2c_client_get_device_id(client);
        struct device_node *np = client->dev.of_node;
        struct adv7180_state *state;
        struct v4l2_subdev *sd;
 
        state->client = client;
        state->field = V4L2_FIELD_ALTERNATE;
-       state->chip_info = (struct adv7180_chip_info *)id->driver_data;
+       state->chip_info = i2c_get_match_data(client);
 
        state->pwdn_gpio = devm_gpiod_get_optional(&client->dev, "powerdown",
                                                   GPIOD_OUT_HIGH);
        mutex_destroy(&state->mutex);
 }
 
-static const struct i2c_device_id adv7180_id[] = {
-       { "adv7180", (kernel_ulong_t)&adv7180_info },
-       { "adv7180cp", (kernel_ulong_t)&adv7180_info },
-       { "adv7180st", (kernel_ulong_t)&adv7180_info },
-       { "adv7182", (kernel_ulong_t)&adv7182_info },
-       { "adv7280", (kernel_ulong_t)&adv7280_info },
-       { "adv7280-m", (kernel_ulong_t)&adv7280_m_info },
-       { "adv7281", (kernel_ulong_t)&adv7281_info },
-       { "adv7281-m", (kernel_ulong_t)&adv7281_m_info },
-       { "adv7281-ma", (kernel_ulong_t)&adv7281_ma_info },
-       { "adv7282", (kernel_ulong_t)&adv7282_info },
-       { "adv7282-m", (kernel_ulong_t)&adv7282_m_info },
-       {},
-};
-MODULE_DEVICE_TABLE(i2c, adv7180_id);
-
 #ifdef CONFIG_PM_SLEEP
 static int adv7180_suspend(struct device *dev)
 {
 #define ADV7180_PM_OPS NULL
 #endif
 
+static const struct i2c_device_id adv7180_id[] = {
+       { "adv7180", (kernel_ulong_t)&adv7180_info },
+       { "adv7180cp", (kernel_ulong_t)&adv7180_info },
+       { "adv7180st", (kernel_ulong_t)&adv7180_info },
+       { "adv7182", (kernel_ulong_t)&adv7182_info },
+       { "adv7280", (kernel_ulong_t)&adv7280_info },
+       { "adv7280-m", (kernel_ulong_t)&adv7280_m_info },
+       { "adv7281", (kernel_ulong_t)&adv7281_info },
+       { "adv7281-m", (kernel_ulong_t)&adv7281_m_info },
+       { "adv7281-ma", (kernel_ulong_t)&adv7281_ma_info },
+       { "adv7282", (kernel_ulong_t)&adv7282_info },
+       { "adv7282-m", (kernel_ulong_t)&adv7282_m_info },
+       {}
+};
+MODULE_DEVICE_TABLE(i2c, adv7180_id);
+
 #ifdef CONFIG_OF
 static const struct of_device_id adv7180_of_id[] = {
-       { .compatible = "adi,adv7180", },
-       { .compatible = "adi,adv7180cp", },
-       { .compatible = "adi,adv7180st", },
-       { .compatible = "adi,adv7182", },
-       { .compatible = "adi,adv7280", },
-       { .compatible = "adi,adv7280-m", },
-       { .compatible = "adi,adv7281", },
-       { .compatible = "adi,adv7281-m", },
-       { .compatible = "adi,adv7281-ma", },
-       { .compatible = "adi,adv7282", },
-       { .compatible = "adi,adv7282-m", },
-       { },
+       { .compatible = "adi,adv7180", &adv7180_info },
+       { .compatible = "adi,adv7180cp", &adv7180_info },
+       { .compatible = "adi,adv7180st", &adv7180_info },
+       { .compatible = "adi,adv7182", &adv7182_info },
+       { .compatible = "adi,adv7280", &adv7280_info },
+       { .compatible = "adi,adv7280-m", &adv7280_m_info },
+       { .compatible = "adi,adv7281", &adv7281_info },
+       { .compatible = "adi,adv7281-m", &adv7281_m_info },
+       { .compatible = "adi,adv7281-ma", &adv7281_ma_info },
+       { .compatible = "adi,adv7282", &adv7282_info },
+       { .compatible = "adi,adv7282-m", &adv7282_m_info },
+       {}
 };
-
 MODULE_DEVICE_TABLE(of, adv7180_of_id);
 #endif