summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Ambarus <tudordana@google.com>2024-01-03 10:09:36 +0000
committerAndré Draszik <draszik@google.com>2024-01-17 18:29:40 +0000
commit9da34e1bd52f3b802bad5f2c3ab1a096cc2849c4 (patch)
treea67d6202a010353e7c8ef65ab5ee9dbc907e2d10
parentc6e6b657a09083e08b55bdd8d99d10669ff8a410 (diff)
downloadcommon-android-gs-raviole-mainline.tar.gz
touch: common: fix build error due to the removal of V4L2_DEVICE_NAME_SIZEandroid-gs-raviole-mainline
Upstream commit 06016a67c61675642c71358c2afe6ce99b5d1468 dropped V4L2_DEVICE_NAME_SIZE as using it is just bad practice. Instead one shall use sizeof(). Use sizeof() in order to determine the v4l2 device name size. Bug: 318475154 Test: compile tested Change-Id: I2db955ee84755b460131c0adc390ff591571f515 Signed-off-by: Tudor Ambarus <tudordana@google.com> (cherry picked from commit 46880547bb6cdc06d8b54a03803e6caf3ad27979)
-rw-r--r--heatmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/heatmap.c b/heatmap.c
index 85a5f65..8834c49 100644
--- a/heatmap.c
+++ b/heatmap.c
@@ -346,7 +346,7 @@ int heatmap_probe(struct v4l2_heatmap *v4l2)
/* register video device */
strlcpy(v4l2->device.name, dev_name(v4l2->parent_dev),
- V4L2_DEVICE_NAME_SIZE);
+ sizeof(v4l2->device.name));
error = v4l2_device_register(v4l2->parent_dev, &v4l2->device);
if (error)
goto err_free_frame_storage;