aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-keene.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2013-06-02 18:41:45 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 10:39:41 -0400
commit542d30f2e00eb10a3e548fb0d0f47646e51c3736 (patch)
treed2e936a3bde170411314c2b93d75cbeae6f19876 /drivers/media/radio/radio-keene.c
parentd13ac96f576ef23670d9e65f8f3771b17fd6dce1 (diff)
[media] radio-keene: set initial frequency
The device was never set to the initial frequency. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-keene.c')
-rw-r--r--drivers/media/radio/radio-keene.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
index 4c9ae767fb31..99da3d4f8d95 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
93 /* If bit 4 is set, then tune to the frequency. 93 /* If bit 4 is set, then tune to the frequency.
94 If bit 3 is set, then unmute; if bit 2 is set, then mute. 94 If bit 3 is set, then unmute; if bit 2 is set, then mute.
95 If bit 1 is set, then enter idle mode; if bit 0 is set, 95 If bit 1 is set, then enter idle mode; if bit 0 is set,
96 then enter transit mode. 96 then enter transmit mode.
97 */ 97 */
98 radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) | 98 radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
99 (freq ? 0x10 : 0); 99 (freq ? 0x10 : 0);
@@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
350 radio->pa = 118; 350 radio->pa = 118;
351 radio->tx = 0x32; 351 radio->tx = 0x32;
352 radio->stereo = true; 352 radio->stereo = true;
353 radio->curfreq = 95.16 * FREQ_MUL;
354 if (hdl->error) { 353 if (hdl->error) {
355 retval = hdl->error; 354 retval = hdl->error;
356 355
@@ -383,6 +382,8 @@ static int usb_keene_probe(struct usb_interface *intf,
383 video_set_drvdata(&radio->vdev, radio); 382 video_set_drvdata(&radio->vdev, radio);
384 set_bit(V4L2_FL_USE_FH_PRIO, &radio->vdev.flags); 383 set_bit(V4L2_FL_USE_FH_PRIO, &radio->vdev.flags);
385 384
385 keene_cmd_main(radio, 95.16 * FREQ_MUL, false);
386
386 retval = video_register_device(&radio->vdev, VFL_TYPE_RADIO, -1); 387 retval = video_register_device(&radio->vdev, VFL_TYPE_RADIO, -1);
387 if (retval < 0) { 388 if (retval < 0) {
388 dev_err(&intf->dev, "could not register video device\n"); 389 dev_err(&intf->dev, "could not register video device\n");