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

Commit 62706d91 authored by Satish Kodishala's avatar Satish Kodishala
Browse files

radio: iris: Enable FM and add support for compat ioctls



Add support for compat ioctls to support 32-bit user space
applications with 64-bit kernel. Also, enabled FM iris
drivers config flags to compile and allow FM radio
functionality.

Change-Id: Id6cc7066e53e056761c595309198f310c5626a66
Signed-off-by: default avatarSatish Kodishala <skodisha@codeaurora.org>
parent 673f6d76
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -473,6 +473,8 @@ CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_MSM_VIDC_V4L2=y
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=m
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
+11 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -4210,10 +4210,17 @@ static int iris_vidioc_s_ctrl(struct file *file, void *priv,
	case V4L2_CID_PRIVATE_IRIS_RIVA_POKE:
		if (radio->riva_data_req.cmd_params.length <=
		    MAX_RIVA_PEEK_RSP_SIZE) {
#ifdef CONFIG_COMPAT
			retval = copy_from_user(
					radio->riva_data_req.data,
					(void *)(__s64)ctrl->value,
					radio->riva_data_req.cmd_params.length);
#else
			retval = copy_from_user(
					radio->riva_data_req.data,
					(void *)ctrl->value,
					radio->riva_data_req.cmd_params.length);
#endif
			if (retval != 0) {
				retval = -retval;
				goto END;
@@ -5095,6 +5102,9 @@ static const struct v4l2_ioctl_ops iris_ioctl_ops = {
static const struct v4l2_file_operations iris_fops = {
	.owner = THIS_MODULE,
	.unlocked_ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
	.compat_ioctl32 = v4l2_compat_ioctl32,
#endif
	.release        = iris_fops_release,
};