@@ -911,12 +911,6 @@ static int max9286_setup(struct max9286_priv *priv)
return 0;
}
-static const struct of_device_id max9286_dt_ids[] = {
- { .compatible = "maxim,max9286" },
- {},
-};
-MODULE_DEVICE_TABLE(of, max9286_dt_ids);
-
static void max9286_gpio_set(struct gpio_chip *chip,
unsigned int offset, int value)
{
@@ -976,10 +970,6 @@ static int max9286_init(struct device *dev)
struct i2c_client *client;
int ret;
- /* Skip non-max9286 devices. */
- if (!dev->of_node || !of_match_node(max9286_dt_ids, dev->of_node))
- return 0;
-
client = to_i2c_client(dev);
priv = i2c_get_clientdata(client);
@@ -1256,6 +1246,12 @@ static int max9286_remove(struct i2c_client *client)
return 0;
}
+static const struct of_device_id max9286_dt_ids[] = {
+ { .compatible = "maxim,max9286" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, max9286_dt_ids);
+
static const struct i2c_device_id max9286_id[] = {
{ "max9286", 0 },
{ }
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> - Move multi-device workarounds out of upstream driver --- drivers/media/i2c/max9286.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)