[media] V4L2: fix compilation if CONFIG_I2C is undefined
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 24 Jun 2013 08:13:51 +0000 (05:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 28 Jun 2013 17:55:29 +0000 (14:55 -0300)
i2c_verify_client() is only available, if I2C is enabled. Fix v4l2-async.c
compilation if I2C is disabled.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/v4l2-async.c

index c80ffb4ba567737bc6d8f70e5648371ee4aff66c..aae241730caad2cd16f116c6a54317128da7cbbb 100644 (file)
 
 static bool match_i2c(struct device *dev, struct v4l2_async_subdev *asd)
 {
+#if IS_ENABLED(CONFIG_I2C)
        struct i2c_client *client = i2c_verify_client(dev);
        return client &&
                asd->bus_type == V4L2_ASYNC_BUS_I2C &&
                asd->match.i2c.adapter_id == client->adapter->nr &&
                asd->match.i2c.address == client->addr;
+#else
+       return false;
+#endif
 }
 
 static bool match_platform(struct device *dev, struct v4l2_async_subdev *asd)