media: v4l2-core: move spi helpers out of v4l2-common.c
Separate the spi helpers to v4l2-spi.c, in order to get rid of the ifdefery. No functional changes intended, this is just a cosmetic change to organize the code better. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:

zatwierdzone przez
Mauro Carvalho Chehab

rodzic
ff35213fda
commit
7c795df5f3
@@ -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
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user