aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorManjunatha Halli <manjunatha_halli@ti.com>2011-03-23 06:44:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-31 17:49:46 -0400
commit6705a9cc52733cb5cbdbee72be66ab462d8fb46f (patch)
tree21a11f907a83f827a1ce2f68d0172f4f432f74df /drivers/media
parent92ce52695ccf2b6c4ef7eb02e1bee1bcbf5fde89 (diff)
[media] radio: wl128x: Update registration process with ST
As underlying ST driver registration API's have changed with latest 2.6.38-rc8 kernel this patch will update the FM driver accordingly. Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/radio/wl128x/fmdrv_common.c16
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 64454d39c0c..ecfd9fb167d 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 */
1587u32 fmc_release(struct fmdev *fmdev) 1592u32 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