[media] media-device: Use u64 ints for pointers

By using u64 integers and pointers, we can get rid of compat32
logic. So, let's do it!

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab
2015-12-11 16:07:57 -02:00
parent d1b9da2d60
commit b3b7a9f138
2 changed files with 58 additions and 51 deletions

View File

@@ -23,6 +23,9 @@
#ifndef __LINUX_MEDIA_H
#define __LINUX_MEDIA_H
#ifndef __KERNEL__
#include <stdint.h>
#endif
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/version.h>
@@ -320,27 +323,26 @@ struct media_v2_link {
};
struct media_v2_topology {
__u32 topology_version;
__u64 topology_version;
__u32 num_entities;
struct media_v2_entity *entities;
__u64 num_entities;
__u64 ptr_entities;
__u32 num_interfaces;
struct media_v2_interface *interfaces;
__u64 num_interfaces;
__u64 ptr_interfaces;
__u32 num_pads;
struct media_v2_pad *pads;
__u64 num_pads;
__u64 ptr_pads;
__u32 num_links;
struct media_v2_link *links;
struct {
__u32 reserved_num;
void *reserved_ptr;
} reserved_types[16];
__u32 reserved[8];
__u64 num_links;
__u64 ptr_links;
};
static inline void __user *media_get_uptr(__u64 arg)
{
return (void __user *)(uintptr_t)arg;
}
/* ioctls */
#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)