diff options
| author | Guennadi Liakhovetski <[email protected]> | 2013-06-24 08:13:51 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2013-06-28 17:55:29 +0000 |
| commit | fe05e141a4d70d9417fd628133ecb32851f2e136 (patch) | |
| tree | 2f21d36c1529cb4c15d45f9b561b7fa11d5affc0 /drivers/media/v4l2-core/v4l2-async.c | |
| parent | [media] V4L2: sh_vou: add I2C build dependency (diff) | |
| download | kernel-fe05e141a4d70d9417fd628133ecb32851f2e136.tar.gz kernel-fe05e141a4d70d9417fd628133ecb32851f2e136.zip | |
[media] V4L2: fix compilation if CONFIG_I2C is undefined
i2c_verify_client() is only available, if I2C is enabled. Fix v4l2-async.c
compilation if I2C is disabled.
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-async.c')
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-async.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index c80ffb4ba567..aae241730caa 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -24,11 +24,15 @@ 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) |
