aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-si470x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:03:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:03:59 -0400
commitcf2fa66055d718ae13e62451bb546505f63906a2 (patch)
treee206d3f04e74a34e9aa88d21af6c26eea21d4121 /drivers/media/radio/radio-si470x.c
parent4501a466f28788485604ee42641d7a5fe7258d16 (diff)
parent57f51dbc45f65f7ee1e8c8f77200bb8000e3e271 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (313 commits) V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cards V4L/DVB (9185): S2API: Ensure we have a reasonable ROLLOFF default V4L/DVB (9184): cx24116: Change the default SNR units back to percentage by default. V4L/DVB (9183): S2API: Return error of the caller provides 0 commands. V4L/DVB (9182): S2API: Added support for DTV_HIERARCHY V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRANSMISSION_MODE V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LP V4L/DVB (9179): S2API: frontend.h cleanup V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO. V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16 V4L/DVB (9176): Add support for DvbWorld USB cards with STV0288 demodulator. V4L/DVB (9175): Remove NULL pointer in stb6000 driver. V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator. V4L/DVB (9173): S2API: Remove the hardcoded command limit during validation V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the legacy API. V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API. V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the cx24116 demod. V4L/DVB (9169): uvcvideo: Support two new Bison Electronics webcams. V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote V4L/DVB: v4l2-dev: remove duplicated #include ...
Diffstat (limited to 'drivers/media/radio/radio-si470x.c')
-rw-r--r--drivers/media/radio/radio-si470x.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c
index 16c7ef20265c..f6cedcd3ab97 100644
--- a/drivers/media/radio/radio-si470x.c
+++ b/drivers/media/radio/radio-si470x.c
@@ -986,7 +986,7 @@ static void si470x_work(struct work_struct *work)
986static ssize_t si470x_fops_read(struct file *file, char __user *buf, 986static ssize_t si470x_fops_read(struct file *file, char __user *buf,
987 size_t count, loff_t *ppos) 987 size_t count, loff_t *ppos)
988{ 988{
989 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 989 struct si470x_device *radio = video_drvdata(file);
990 int retval = 0; 990 int retval = 0;
991 unsigned int block_count = 0; 991 unsigned int block_count = 0;
992 992
@@ -1047,7 +1047,7 @@ done:
1047static unsigned int si470x_fops_poll(struct file *file, 1047static unsigned int si470x_fops_poll(struct file *file,
1048 struct poll_table_struct *pts) 1048 struct poll_table_struct *pts)
1049{ 1049{
1050 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1050 struct si470x_device *radio = video_drvdata(file);
1051 int retval = 0; 1051 int retval = 0;
1052 1052
1053 /* switch on rds reception */ 1053 /* switch on rds reception */
@@ -1071,9 +1071,10 @@ static unsigned int si470x_fops_poll(struct file *file,
1071 */ 1071 */
1072static int si470x_fops_open(struct inode *inode, struct file *file) 1072static int si470x_fops_open(struct inode *inode, struct file *file)
1073{ 1073{
1074 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1074 struct si470x_device *radio = video_drvdata(file);
1075 int retval; 1075 int retval;
1076 1076
1077 lock_kernel();
1077 radio->users++; 1078 radio->users++;
1078 1079
1079 retval = usb_autopm_get_interface(radio->intf); 1080 retval = usb_autopm_get_interface(radio->intf);
@@ -1090,6 +1091,7 @@ static int si470x_fops_open(struct inode *inode, struct file *file)
1090 } 1091 }
1091 1092
1092done: 1093done:
1094 unlock_kernel();
1093 return retval; 1095 return retval;
1094} 1096}
1095 1097
@@ -1099,7 +1101,7 @@ done:
1099 */ 1101 */
1100static int si470x_fops_release(struct inode *inode, struct file *file) 1102static int si470x_fops_release(struct inode *inode, struct file *file)
1101{ 1103{
1102 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1104 struct si470x_device *radio = video_drvdata(file);
1103 int retval = 0; 1105 int retval = 0;
1104 1106
1105 /* safety check */ 1107 /* safety check */
@@ -1282,7 +1284,7 @@ done:
1282static int si470x_vidioc_g_ctrl(struct file *file, void *priv, 1284static int si470x_vidioc_g_ctrl(struct file *file, void *priv,
1283 struct v4l2_control *ctrl) 1285 struct v4l2_control *ctrl)
1284{ 1286{
1285 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1287 struct si470x_device *radio = video_drvdata(file);
1286 int retval = 0; 1288 int retval = 0;
1287 1289
1288 /* safety checks */ 1290 /* safety checks */
@@ -1318,7 +1320,7 @@ done:
1318static int si470x_vidioc_s_ctrl(struct file *file, void *priv, 1320static int si470x_vidioc_s_ctrl(struct file *file, void *priv,
1319 struct v4l2_control *ctrl) 1321 struct v4l2_control *ctrl)
1320{ 1322{
1321 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1323 struct si470x_device *radio = video_drvdata(file);
1322 int retval = 0; 1324 int retval = 0;
1323 1325
1324 /* safety checks */ 1326 /* safety checks */
@@ -1405,7 +1407,7 @@ done:
1405static int si470x_vidioc_g_tuner(struct file *file, void *priv, 1407static int si470x_vidioc_g_tuner(struct file *file, void *priv,
1406 struct v4l2_tuner *tuner) 1408 struct v4l2_tuner *tuner)
1407{ 1409{
1408 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1410 struct si470x_device *radio = video_drvdata(file);
1409 int retval = 0; 1411 int retval = 0;
1410 1412
1411 /* safety checks */ 1413 /* safety checks */
@@ -1471,7 +1473,7 @@ done:
1471static int si470x_vidioc_s_tuner(struct file *file, void *priv, 1473static int si470x_vidioc_s_tuner(struct file *file, void *priv,
1472 struct v4l2_tuner *tuner) 1474 struct v4l2_tuner *tuner)
1473{ 1475{
1474 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1476 struct si470x_device *radio = video_drvdata(file);
1475 int retval = 0; 1477 int retval = 0;
1476 1478
1477 /* safety checks */ 1479 /* safety checks */
@@ -1505,7 +1507,7 @@ done:
1505static int si470x_vidioc_g_frequency(struct file *file, void *priv, 1507static int si470x_vidioc_g_frequency(struct file *file, void *priv,
1506 struct v4l2_frequency *freq) 1508 struct v4l2_frequency *freq)
1507{ 1509{
1508 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1510 struct si470x_device *radio = video_drvdata(file);
1509 int retval = 0; 1511 int retval = 0;
1510 1512
1511 /* safety checks */ 1513 /* safety checks */
@@ -1534,7 +1536,7 @@ done:
1534static int si470x_vidioc_s_frequency(struct file *file, void *priv, 1536static int si470x_vidioc_s_frequency(struct file *file, void *priv,
1535 struct v4l2_frequency *freq) 1537 struct v4l2_frequency *freq)
1536{ 1538{
1537 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1539 struct si470x_device *radio = video_drvdata(file);
1538 int retval = 0; 1540 int retval = 0;
1539 1541
1540 /* safety checks */ 1542 /* safety checks */
@@ -1563,7 +1565,7 @@ done:
1563static int si470x_vidioc_s_hw_freq_seek(struct file *file, void *priv, 1565static int si470x_vidioc_s_hw_freq_seek(struct file *file, void *priv,
1564 struct v4l2_hw_freq_seek *seek) 1566 struct v4l2_hw_freq_seek *seek)
1565{ 1567{
1566 struct si470x_device *radio = video_get_drvdata(video_devdata(file)); 1568 struct si470x_device *radio = video_drvdata(file);
1567 int retval = 0; 1569 int retval = 0;
1568 1570
1569 /* safety checks */ 1571 /* safety checks */