Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114079
b: refs/heads/master
c: b4be204
h: refs/heads/master
i:
  114077: 0b22748
  114075: c7ddba3
  114071: 8de8568
  114063: b7de336
  114047: 61b56ec
v: v3
  • Loading branch information
Alexey Klimov authored and Mauro Carvalho Chehab committed Oct 13, 2008
1 parent f835023 commit 0975d6d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90b698dd47f3929f20746f828e2cd648bc6539dd
refs/heads/master: b4be2048ce62d05d93608f82d5e986612ed4fdf7
17 changes: 13 additions & 4 deletions trunk/drivers/media/radio/radio-zoltrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq)
unsigned int stereo = dev->stereo;
int i;

if (freq == 0)
return 1;
if (freq == 0) {
printk(KERN_WARNING "zoltrix: received zero freq. Failed to set.\n");
return -EINVAL;
}

m = (freq / 160 - 8800) * 2;
f = (unsigned long long) m + 0x4d1c;

Expand Down Expand Up @@ -279,7 +282,10 @@ static int vidioc_s_frequency(struct file *file, void *priv,
struct zol_device *zol = video_drvdata(file);

zol->curfreq = f->frequency;
zol_setfreq(zol, zol->curfreq);
if (zol_setfreq(zol, zol->curfreq) != 0) {
printk(KERN_WARNING "zoltrix: Set frequency failed.\n");
return -EINVAL;
}
return 0;
}

Expand Down Expand Up @@ -343,7 +349,10 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
return 0;
}
zol->stereo = 1;
zol_setfreq(zol, zol->curfreq);
if (zol_setfreq(zol, zol->curfreq) != 0) {
printk(KERN_WARNING "zoltrix: Set frequency failed.\n");
return -EINVAL;
}
#if 0
/* FIXME: Implement stereo/mono switch on V4L2 */
if (v->mode & VIDEO_SOUND_STEREO) {
Expand Down

0 comments on commit 0975d6d

Please sign in to comment.