diff options
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r-- | include/media/v4l2-common.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 6b319d0d73ad..a1c5288caa6a 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -216,11 +216,10 @@ const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type); /* ------------------------------------------------------------------------- */ /* SPI Helper functions */ -#if defined(CONFIG_SPI) #include <linux/spi/spi.h> -struct spi_device; +#if defined(CONFIG_SPI) /** * v4l2_spi_new_subdev - Load an spi module and return an initialized @@ -246,6 +245,21 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, */ void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, const struct v4l2_subdev_ops *ops); + +#else + +static inline struct v4l2_subdev * +v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, + struct spi_master *master, struct spi_board_info *info) +{ + return NULL; +} + +static inline void +v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, + const struct v4l2_subdev_ops *ops) +{} + #endif /* ------------------------------------------------------------------------- */ |