diff options
| author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-23 17:20:57 +0200 |
|---|---|---|
| committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 10:47:22 +0200 |
| commit | 8cdd708f11655d5f28fca1ab2fa0dbe5424f274c (patch) | |
| tree | d5d4d6e24436144d00901115f44d8d7f04eac223 /drivers/media/platform/cadence/cdns-csi2tx.c | |
| parent | media: v4l2-subdev.h: increase struct v4l2_subdev name size (diff) | |
| download | linux-8cdd708f11655d5f28fca1ab2fa0dbe5424f274c.tar.gz linux-8cdd708f11655d5f28fca1ab2fa0dbe5424f274c.zip | |
media: use sizeof() instead of V4L2_SUBDEV_NAME_SIZE
Don't rely on a define, let the compiler use the actual
field size.
Remove all uses of the V4L2_SUBDEV_NAME_SIZE define and also
drop the define itself.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'drivers/media/platform/cadence/cdns-csi2tx.c')
| -rw-r--r-- | drivers/media/platform/cadence/cdns-csi2tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/cadence/cdns-csi2tx.c b/drivers/media/platform/cadence/cdns-csi2tx.c index cbbb77520112..c115742f347f 100644 --- a/drivers/media/platform/cadence/cdns-csi2tx.c +++ b/drivers/media/platform/cadence/cdns-csi2tx.c @@ -592,8 +592,8 @@ static int csi2tx_probe(struct platform_device *pdev) csi2tx->subdev.owner = THIS_MODULE; csi2tx->subdev.dev = &pdev->dev; csi2tx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - snprintf(csi2tx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s", - KBUILD_MODNAME, dev_name(&pdev->dev)); + snprintf(csi2tx->subdev.name, sizeof(csi2tx->subdev.name), + "%s.%s", KBUILD_MODNAME, dev_name(&pdev->dev)); ret = csi2tx_check_lanes(csi2tx); if (ret) |
