Commit 3e858759f72931683cb4a938871bac7a87d0de56
Exists in
master
and in
7 other branches
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] radio: wl128x: Update registration process with ST [media] staging: altera-jtag needs delay.h
Showing 2 changed files 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 |
drivers/staging/altera-stapl/altera-jtag.c