mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
[media] v4l2-ioctl: dbg_g/s_register: only match BRIDGE and SUBDEV types
Drop support for V4L2_CHIP_MATCH_I2C_DRIVER/ADDR and V4L2_CHIP_MATCH_AC97 types. The following patches will remove support for those in the drivers as well. This means that bridge drivers no longer have to check for the match.type field in their g/s_register implementations. Only if they also implement g_chip_info do they still have to check the match.addr field, otherwise the core will check for that as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
dd8c393b3c
commit
191b79b088
@ -1807,7 +1807,8 @@ static int v4l_dbg_g_register(const struct v4l2_ioctl_ops *ops,
|
||||
return v4l2_subdev_call(sd, core, g_register, p);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ops->vidioc_g_register)
|
||||
if (ops->vidioc_g_register && p->match.type == V4L2_CHIP_MATCH_BRIDGE &&
|
||||
(ops->vidioc_g_chip_info || p->match.addr == 0))
|
||||
return ops->vidioc_g_register(file, fh, p);
|
||||
return -EINVAL;
|
||||
#else
|
||||
@ -1834,7 +1835,8 @@ static int v4l_dbg_s_register(const struct v4l2_ioctl_ops *ops,
|
||||
return v4l2_subdev_call(sd, core, s_register, p);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ops->vidioc_s_register)
|
||||
if (ops->vidioc_s_register && p->match.type == V4L2_CHIP_MATCH_BRIDGE &&
|
||||
(ops->vidioc_g_chip_info || p->match.addr == 0))
|
||||
return ops->vidioc_s_register(file, fh, p);
|
||||
return -EINVAL;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user