diff options
author | zhong jiang <zhongjiang@huawei.com> | 2019-11-10 07:22:17 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2019-11-10 07:22:17 +0100 |
commit | 40ee7524722836bd5fd40d45f8ee872a41f6ea8e (patch) | |
tree | 3d611560dc88ab5e5270dbf866f3296ce062d4c1 /drivers/media/v4l2-core | |
parent | 7204e062aede46607fe8c63418e3e703443764dd (diff) | |
download | linux-40ee7524722836bd5fd40d45f8ee872a41f6ea8e.tar.gz linux-40ee7524722836bd5fd40d45f8ee872a41f6ea8e.tar.bz2 linux-40ee7524722836bd5fd40d45f8ee872a41f6ea8e.zip |
media: v4l2: Use FIELD_SIZEOF directly
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 315ac12c3e0a..60453b21a855 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2652,7 +2652,7 @@ struct v4l2_ioctl_info { /* Zero struct from after the field to the end */ #define INFO_FL_CLEAR(v4l2_struct, field) \ ((offsetof(struct v4l2_struct, field) + \ - sizeof(((struct v4l2_struct *)0)->field)) << 16) + FIELD_SIZEOF(struct v4l2_struct, field)) << 16) #define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16) #define DEFINE_V4L_STUB_FUNC(_vidioc) \ |