Commit 6705a9cc52733cb5cbdbee72be66ab462d8fb46f

Authored by Manjunatha Halli
Committed by Mauro Carvalho Chehab
1 parent 92ce52695c

[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>

Showing 1 changed file with 13 additions and 3 deletions Side-by-side Diff

drivers/media/radio/wl128x/fmdrv_common.c
... ... @@ -1494,12 +1494,17 @@
1494 1494 }
1495 1495  
1496 1496 memset(&fm_st_proto, 0, sizeof(fm_st_proto));
1497   - fm_st_proto.type = ST_FM;
1498 1497 fm_st_proto.recv = fm_st_receive;
1499 1498 fm_st_proto.match_packet = NULL;
1500 1499 fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb;
1501 1500 fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */
1502 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 1509 ret = st_register(&fm_st_proto);
1505 1510 if (ret == -EINPROGRESS) {
... ... @@ -1532,7 +1537,7 @@
1532 1537 g_st_write = fm_st_proto.write;
1533 1538 } else {
1534 1539 fmerr("Failed to get ST write func pointer\n");
1535   - ret = st_unregister(ST_FM);
  1540 + ret = st_unregister(&fm_st_proto);
1536 1541 if (ret < 0)
1537 1542 fmerr("st_unregister failed %d\n", ret);
1538 1543 return -EAGAIN;
... ... @@ -1586,6 +1591,7 @@
1586 1591 */
1587 1592 u32 fmc_release(struct fmdev *fmdev)
1588 1593 {
  1594 + static struct st_proto_s fm_st_proto;
1589 1595 u32 ret;
1590 1596  
1591 1597 if (!test_bit(FM_CORE_READY, &fmdev->flag)) {
... ... @@ -1604,7 +1610,11 @@
1604 1610 fmdev->resp_comp = NULL;
1605 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 1618 if (ret < 0)
1609 1619 fmerr("Failed to de-register FM from ST %d\n", ret);
1610 1620 else