diff options
author | Hemant Gupta <hemant.gupta@stericsson.com> | 2011-09-09 16:16:22 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 09:01:23 +0100 |
commit | 9c522fba493e186cfb22776b6d0c34bf3d6aebf9 (patch) | |
tree | a03bd89246e1076a653d1a8e0c8967c229e48fba /drivers/media/radio/CG2900/radio-cg2900.c | |
parent | fe9038bb4eff7c514e36a0c338e72686910cfe5c (diff) |
CG2900 FM Radio: Adapt to kernel 3.0
This patch adapts the FM driver to kernel 3.0
ST-Ericsson Linux next: NA
ST-Ericsson ID: 352334
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I93b6a1f8251709cfe36eeaa41fc5cdfc4350a5e5
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30532
Reviewed-by: Hemant GUPTA <hemant.gupta@stericsson.com>
Reviewed-by: Johan PALMAEUS <johan.xj.palmaeus@stericsson.com>
Reviewed-by: Virupax SADASHIVPETIMATH <virupax.sadashivpetimath@stericsson.com>
Tested-by: Virupax SADASHIVPETIMATH <virupax.sadashivpetimath@stericsson.com>
Diffstat (limited to 'drivers/media/radio/CG2900/radio-cg2900.c')
-rw-r--r-- | drivers/media/radio/CG2900/radio-cg2900.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/radio/CG2900/radio-cg2900.c b/drivers/media/radio/CG2900/radio-cg2900.c index 6a74c0ac257..0bc06adedb5 100644 --- a/drivers/media/radio/CG2900/radio-cg2900.c +++ b/drivers/media/radio/CG2900/radio-cg2900.c @@ -10,14 +10,13 @@ #include<linux/init.h> #include<linux/videodev2.h> -#include"linux/videodev.h" #include<media/v4l2-ioctl.h> #include<media/v4l2-common.h> #include<linux/module.h> #include <linux/platform_device.h> #include<linux/string.h> #include<linux/wait.h> -#include<linux/mfd/cg2900.h> +#include"cg2900.h" #include"cg2900_fm_driver.h" #define RADIO_CG2900_VERSION KERNEL_VERSION(1, 1, 0) @@ -267,7 +266,6 @@ static const struct v4l2_ioctl_ops cg2900_ioctl_ops = { /* V4L2 Video Device Structure */ static struct video_device cg2900_video_device = { .name = "STE CG2900 FM Rx/Tx Radio", - .vfl_type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, .fops = &cg2900_fops, .ioctl_ops = &cg2900_ioctl_ops, .release = video_device_release_empty, @@ -1663,6 +1661,11 @@ static int vidioc_get_ext_ctrls( "failed with reason = %d", (*fm_interrupt_buffer), (*(fm_interrupt_buffer + 1))); + /* + * Update return value, so that application + * can read the event failure reason. + */ + ret_val = 0; break; } @@ -2530,7 +2533,7 @@ static int cg2900_open( int ret_val = -EINVAL; struct video_device *vdev = video_devdata(file); - lock_kernel(); + mutex_lock(&fm_mutex); users++; FM_INFO_REPORT("cg2900_open: users = %d", users); @@ -2572,7 +2575,7 @@ switch_on_error: init_error: users--; done: - unlock_kernel(); + mutex_unlock(&fm_mutex); FM_DEBUG_REPORT("cg2900_open: returning %d", ret_val); return ret_val; } |