diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-26 17:01:25 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-26 17:01:25 +0300 |
commit | cc14c00c478ce503c28856e7b2425aae5bc7b31e (patch) | |
tree | d7bd6a53b95d6568c00a49e19882765eb8861cde /drivers/media/v4l2-core/v4l2-spi.c | |
parent | 1a065ee3e97cc58ab900ccb7eb2b421fdab1d0dc (diff) | |
download | linux-cc14c00c478ce503c28856e7b2425aae5bc7b31e.tar.xz |
v4l2-core: fix coding style for the two new c files
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>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-spi.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-spi.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/v4l2-core/v4l2-spi.c b/drivers/media/v4l2-core/v4l2-spi.c index 15162659a63b..eadecdff7349 100644 --- a/drivers/media/v4l2-core/v4l2-spi.c +++ b/drivers/media/v4l2-core/v4l2-spi.c @@ -17,7 +17,7 @@ void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd) } void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, - const struct v4l2_subdev_ops *ops) + const struct v4l2_subdev_ops *ops) { v4l2_subdev_init(sd, ops); sd->flags |= V4L2_SUBDEV_FL_IS_SPI; @@ -29,12 +29,13 @@ void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, spi_set_drvdata(spi, sd); /* initialize name */ snprintf(sd->name, sizeof(sd->name), "%s %s", - spi->dev.driver->name, dev_name(&spi->dev)); + spi->dev.driver->name, dev_name(&spi->dev)); } EXPORT_SYMBOL_GPL(v4l2_spi_subdev_init); struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, - struct spi_master *master, struct spi_board_info *info) + struct spi_master *master, + struct spi_board_info *info) { struct v4l2_subdev *sd = NULL; struct spi_device *spi = NULL; @@ -46,7 +47,7 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, spi = spi_new_device(master, info); - if (spi == NULL || spi->dev.driver == NULL) + if (!spi || !spi->dev.driver) goto error; if (!try_module_get(spi->dev.driver->owner)) @@ -54,8 +55,10 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, sd = spi_get_drvdata(spi); - /* Register with the v4l2_device which increases the module's - use count as well. */ + /* + * Register with the v4l2_device which increases the module's + * use count as well. + */ if (v4l2_device_register_subdev(v4l2_dev, sd)) sd = NULL; @@ -63,8 +66,10 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, module_put(spi->dev.driver->owner); error: - /* If we have a client but no subdev, then something went wrong and - we must unregister the client. */ + /* + * If we have a client but no subdev, then something went wrong and + * we must unregister the client. + */ if (!sd) spi_unregister_device(spi); |