mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
[media] media-device: Simplify compat32 logic
Only MEDIA_IOC_ENUM_LINKS32 require an special logic when userspace is 32 bits and Kernel is 64 bits. For the rest, media_device_ioctl() will do the right thing, and will return -ENOIOCTLCMD if the ioctl is unknown. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
00303f9134
commit
f73696275e
@ -499,12 +499,6 @@ static long media_device_compat_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
long ret;
|
long ret;
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case MEDIA_IOC_DEVICE_INFO:
|
|
||||||
case MEDIA_IOC_ENUM_ENTITIES:
|
|
||||||
case MEDIA_IOC_SETUP_LINK:
|
|
||||||
case MEDIA_IOC_G_TOPOLOGY:
|
|
||||||
return media_device_ioctl(filp, cmd, arg);
|
|
||||||
|
|
||||||
case MEDIA_IOC_ENUM_LINKS32:
|
case MEDIA_IOC_ENUM_LINKS32:
|
||||||
mutex_lock(&dev->graph_mutex);
|
mutex_lock(&dev->graph_mutex);
|
||||||
ret = media_device_enum_links32(dev,
|
ret = media_device_enum_links32(dev,
|
||||||
@ -513,7 +507,7 @@ static long media_device_compat_ioctl(struct file *filp, unsigned int cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = -ENOIOCTLCMD;
|
return media_device_ioctl(filp, cmd, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user