Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a40e10d authored by Gopikrishnaiah Anandan's avatar Gopikrishnaiah Anandan
Browse files

avtimer: Add compat ioctl support for avtimer



If userspace is 32 bit and kernel is in 64 bit mode, ioctls for avtimer
will be called via the compat mode. Change adds support for compat ioctl
avtimer driver.

Change-Id: I8bf44f57efdc6069ea7c8badc8049c4b6b6e4eb5
Signed-off-by: default avatarGopikrishnaiah Anandan <agopik@codeaurora.org>
parent 763e35c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ struct avtimer_t {
	struct class *avtimer_class;
	struct mutex avtimer_lock;
	int avtimer_open_cnt;
	struct dev_avtimer_data avtimer_pdata;
	wait_queue_head_t adsp_resp_wait;
	int enable_timer_resp_recieved;
	int timer_handle;
@@ -340,6 +339,7 @@ static long avtimer_ioctl(struct file *file, unsigned int ioctl_num,

static const struct file_operations avtimer_fops = {
	.unlocked_ioctl = avtimer_ioctl,
	.compat_ioctl = avtimer_ioctl,
	.open = avtimer_open,
	.release = avtimer_release
};
+1 −10
Original line number Diff line number Diff line
@@ -5,15 +5,6 @@

#define MAJOR_NUM 100

#define IOCTL_GET_AVTIMER_TICK _IOR(MAJOR_NUM, 0, char *)
/*
 * This IOCTL is used read the avtimer tick value.
 * Avtimer is a 64 bit timer tick, hence the expected
 * argument is of type uint64_t
 */
struct dev_avtimer_data {
	uint32_t avtimer_msw_phy_addr;
	uint32_t avtimer_lsw_phy_addr;
};
#define IOCTL_GET_AVTIMER_TICK _IOR(MAJOR_NUM, 0, uint64_t)

#endif