summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/v4l2-spi.c
AgeCommit message (Collapse)Author
2019-08-26v4l2-core: fix coding style for the two new c filesMauro Carvalho Chehab
As I2C and SPI parts of the V4L2 core got split, let's take the chance and solve the CodingStyle issues there, as reported by checkpatch --strict. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-26media: v4l2-core: Remove BUG() from i2c and spi helpersEzequiel Garcia
Currently, the i2c and spi subdev creation helpers are calling BUG() when passed a NULL v4l2_device parameter. This makes little sense; simply returning NULL seems more sensible. These two helpers may already return NULL on error, so callers should already be checking for this, or at least be prepared for a NULL result. 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>
2019-08-26media: v4l2-core: introduce a helper to unregister a spi subdevEzequiel Garcia
Introduce a new video4linux2 spi helper, to unregister a subdev. This allows to get rid of some more ifdefs. 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>
2019-08-26media: v4l2-core: move spi helpers out of v4l2-common.cEzequiel Garcia
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>