diff options
author | Frederic Chen <frederic.chen@mediatek.com> | 2020-08-06 18:58:22 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-08-29 09:15:23 +0300 |
commit | c478c7f4cb940b63eb675d236588c6fda7adea08 (patch) | |
tree | f2a4ead0200be14acd8bf7f8dc71ff90496bb9de /drivers/media/mc | |
parent | 78d95c35f2a4ceaf207e82f66e4d678c1682ae6b (diff) | |
download | linux-c478c7f4cb940b63eb675d236588c6fda7adea08.tar.xz |
media: mc-device.c: change media_device_request_alloc to match media_ioctl_info
We modified the type of media_device_request_alloc()'s second
parameter from int* to void* so that it can match the interface
defined in struct media_ioctl_info.
[hverkuil: move #ifdef before variable to avoid compile warning]
Signed-off-by: Frederic Chen <frederic.chen@mediatek.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/mc')
-rw-r--r-- | drivers/media/mc/mc-device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c index da8088351135..9e56d2ad6b94 100644 --- a/drivers/media/mc/mc-device.c +++ b/drivers/media/mc/mc-device.c @@ -370,10 +370,11 @@ static long media_device_get_topology(struct media_device *mdev, void *arg) return ret; } -static long media_device_request_alloc(struct media_device *mdev, - int *alloc_fd) +static long media_device_request_alloc(struct media_device *mdev, void *arg) { #ifdef CONFIG_MEDIA_CONTROLLER_REQUEST_API + int *alloc_fd = arg; + if (!mdev->ops || !mdev->ops->req_validate || !mdev->ops->req_queue) return -ENOTTY; @@ -407,7 +408,7 @@ static long copy_arg_to_user(void __user *uarg, void *karg, unsigned int cmd) #define MEDIA_IOC_ARG(__cmd, func, fl, from_user, to_user) \ [_IOC_NR(MEDIA_IOC_##__cmd)] = { \ .cmd = MEDIA_IOC_##__cmd, \ - .fn = (long (*)(struct media_device *, void *))func, \ + .fn = func, \ .flags = fl, \ .arg_from_user = from_user, \ .arg_to_user = to_user, \ |