diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_common.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 64454d39c0ca..ecfd9fb167d8 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c | |||
@@ -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,6 +1591,7 @@ 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)) { |
@@ -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 |