diff options
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/radio-mr800.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/si4713-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_common.c | 22 | ||||
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_common.h | 2 |
4 files changed, 19 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index e6b2d085a449..b3a635b95820 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
@@ -99,7 +99,7 @@ devices, that would be 76 and 91. */ | |||
99 | 99 | ||
100 | /* | 100 | /* |
101 | * Commands that device should understand | 101 | * Commands that device should understand |
102 | * List isnt full and will be updated with implementation of new functions | 102 | * List isn't full and will be updated with implementation of new functions |
103 | */ | 103 | */ |
104 | #define AMRADIO_SET_FREQ 0xa4 | 104 | #define AMRADIO_SET_FREQ 0xa4 |
105 | #define AMRADIO_SET_MUTE 0xab | 105 | #define AMRADIO_SET_MUTE 0xab |
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c index 0fab6f8f7e24..deca2e06ff22 100644 --- a/drivers/media/radio/si4713-i2c.c +++ b/drivers/media/radio/si4713-i2c.c | |||
@@ -481,7 +481,7 @@ unlock: | |||
481 | } | 481 | } |
482 | 482 | ||
483 | /* | 483 | /* |
484 | * si4713_wait_stc - Waits STC interrupt and clears status bits. Usefull | 484 | * si4713_wait_stc - Waits STC interrupt and clears status bits. Useful |
485 | * for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS | 485 | * for TX_TUNE_POWER, TX_TUNE_FREQ and TX_TUNE_MEAS |
486 | * @sdev: si4713_device structure for the device we are communicating | 486 | * @sdev: si4713_device structure for the device we are communicating |
487 | * @usecs: timeout to wait for STC interrupt signal | 487 | * @usecs: timeout to wait for STC interrupt signal |
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 64454d39c0ca..5991ab60303d 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c | |||
@@ -352,7 +352,7 @@ static void send_tasklet(unsigned long arg) | |||
352 | if (!atomic_read(&fmdev->tx_cnt)) | 352 | if (!atomic_read(&fmdev->tx_cnt)) |
353 | return; | 353 | return; |
354 | 354 | ||
355 | /* Check, is there any timeout happenned to last transmitted packet */ | 355 | /* Check, is there any timeout happened to last transmitted packet */ |
356 | if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { | 356 | if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { |
357 | fmerr("TX timeout occurred\n"); | 357 | fmerr("TX timeout occurred\n"); |
358 | atomic_set(&fmdev->tx_cnt, 1); | 358 | atomic_set(&fmdev->tx_cnt, 1); |
@@ -478,7 +478,7 @@ u32 fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload, | |||
478 | return -ETIMEDOUT; | 478 | return -ETIMEDOUT; |
479 | } | 479 | } |
480 | if (!fmdev->resp_skb) { | 480 | if (!fmdev->resp_skb) { |
481 | fmerr("Reponse SKB is missing\n"); | 481 | fmerr("Response SKB is missing\n"); |
482 | return -EFAULT; | 482 | return -EFAULT; |
483 | } | 483 | } |
484 | spin_lock_irqsave(&fmdev->resp_skb_lock, flags); | 484 | spin_lock_irqsave(&fmdev->resp_skb_lock, flags); |
@@ -1494,12 +1494,17 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); | 1496 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); |
1497 | fm_st_proto.type = ST_FM; | ||
1498 | fm_st_proto.recv = fm_st_receive; | 1497 | fm_st_proto.recv = fm_st_receive; |
1499 | fm_st_proto.match_packet = NULL; | 1498 | fm_st_proto.match_packet = NULL; |
1500 | fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb; | 1499 | fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb; |
1501 | fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */ | 1500 | fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */ |
1502 | fm_st_proto.priv_data = fmdev; | 1501 | fm_st_proto.priv_data = fmdev; |
1502 | fm_st_proto.chnl_id = 0x08; | ||
1503 | fm_st_proto.max_frame_size = 0xff; | ||
1504 | fm_st_proto.hdr_len = 1; | ||
1505 | fm_st_proto.offset_len_in_hdr = 0; | ||
1506 | fm_st_proto.len_size = 1; | ||
1507 | fm_st_proto.reserve = 1; | ||
1503 | 1508 | ||
1504 | ret = st_register(&fm_st_proto); | 1509 | ret = st_register(&fm_st_proto); |
1505 | if (ret == -EINPROGRESS) { | 1510 | if (ret == -EINPROGRESS) { |
@@ -1532,7 +1537,7 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
1532 | g_st_write = fm_st_proto.write; | 1537 | g_st_write = fm_st_proto.write; |
1533 | } else { | 1538 | } else { |
1534 | fmerr("Failed to get ST write func pointer\n"); | 1539 | fmerr("Failed to get ST write func pointer\n"); |
1535 | ret = st_unregister(ST_FM); | 1540 | ret = st_unregister(&fm_st_proto); |
1536 | if (ret < 0) | 1541 | if (ret < 0) |
1537 | fmerr("st_unregister failed %d\n", ret); | 1542 | fmerr("st_unregister failed %d\n", ret); |
1538 | return -EAGAIN; | 1543 | return -EAGAIN; |
@@ -1586,13 +1591,14 @@ u32 fmc_prepare(struct fmdev *fmdev) | |||
1586 | */ | 1591 | */ |
1587 | u32 fmc_release(struct fmdev *fmdev) | 1592 | u32 fmc_release(struct fmdev *fmdev) |
1588 | { | 1593 | { |
1594 | static struct st_proto_s fm_st_proto; | ||
1589 | u32 ret; | 1595 | u32 ret; |
1590 | 1596 | ||
1591 | if (!test_bit(FM_CORE_READY, &fmdev->flag)) { | 1597 | if (!test_bit(FM_CORE_READY, &fmdev->flag)) { |
1592 | fmdbg("FM Core is already down\n"); | 1598 | fmdbg("FM Core is already down\n"); |
1593 | return 0; | 1599 | return 0; |
1594 | } | 1600 | } |
1595 | /* Sevice pending read */ | 1601 | /* Service pending read */ |
1596 | wake_up_interruptible(&fmdev->rx.rds.read_queue); | 1602 | wake_up_interruptible(&fmdev->rx.rds.read_queue); |
1597 | 1603 | ||
1598 | tasklet_kill(&fmdev->tx_task); | 1604 | tasklet_kill(&fmdev->tx_task); |
@@ -1604,7 +1610,11 @@ u32 fmc_release(struct fmdev *fmdev) | |||
1604 | fmdev->resp_comp = NULL; | 1610 | fmdev->resp_comp = NULL; |
1605 | fmdev->rx.freq = 0; | 1611 | fmdev->rx.freq = 0; |
1606 | 1612 | ||
1607 | ret = st_unregister(ST_FM); | 1613 | memset(&fm_st_proto, 0, sizeof(fm_st_proto)); |
1614 | fm_st_proto.chnl_id = 0x08; | ||
1615 | |||
1616 | ret = st_unregister(&fm_st_proto); | ||
1617 | |||
1608 | if (ret < 0) | 1618 | if (ret < 0) |
1609 | fmerr("Failed to de-register FM from ST %d\n", ret); | 1619 | fmerr("Failed to de-register FM from ST %d\n", ret); |
1610 | else | 1620 | else |
diff --git a/drivers/media/radio/wl128x/fmdrv_common.h b/drivers/media/radio/wl128x/fmdrv_common.h index 427c4164cece..aee243bb6630 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.h +++ b/drivers/media/radio/wl128x/fmdrv_common.h | |||
@@ -362,7 +362,7 @@ struct fm_event_msg_hdr { | |||
362 | #define FM_TX_PREEMPH_50US 0 | 362 | #define FM_TX_PREEMPH_50US 0 |
363 | #define FM_TX_PREEMPH_75US 2 | 363 | #define FM_TX_PREEMPH_75US 2 |
364 | 364 | ||
365 | /* FM TX antenna impedence values */ | 365 | /* FM TX antenna impedance values */ |
366 | #define FM_TX_ANT_IMP_50 0 | 366 | #define FM_TX_ANT_IMP_50 0 |
367 | #define FM_TX_ANT_IMP_200 1 | 367 | #define FM_TX_ANT_IMP_200 1 |
368 | #define FM_TX_ANT_IMP_500 2 | 368 | #define FM_TX_ANT_IMP_500 2 |