浏览代码

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
Linus Torvalds 14 年之前
父节点
当前提交
3e858759f7
共有 2 个文件被更改,包括 14 次插入3 次删除
  1. 13 3
      drivers/media/radio/wl128x/fmdrv_common.c
  2. 1 0
      drivers/staging/altera-stapl/altera-jtag.c

+ 13 - 3
drivers/media/radio/wl128x/fmdrv_common.c

@@ -1494,12 +1494,17 @@ u32 fmc_prepare(struct fmdev *fmdev)
 	}
 	}
 
 
 	memset(&fm_st_proto, 0, sizeof(fm_st_proto));
 	memset(&fm_st_proto, 0, sizeof(fm_st_proto));
-	fm_st_proto.type = ST_FM;
 	fm_st_proto.recv = fm_st_receive;
 	fm_st_proto.recv = fm_st_receive;
 	fm_st_proto.match_packet = NULL;
 	fm_st_proto.match_packet = NULL;
 	fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb;
 	fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb;
 	fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */
 	fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */
 	fm_st_proto.priv_data = fmdev;
 	fm_st_proto.priv_data = fmdev;
+	fm_st_proto.chnl_id = 0x08;
+	fm_st_proto.max_frame_size = 0xff;
+	fm_st_proto.hdr_len = 1;
+	fm_st_proto.offset_len_in_hdr = 0;
+	fm_st_proto.len_size = 1;
+	fm_st_proto.reserve = 1;
 
 
 	ret = st_register(&fm_st_proto);
 	ret = st_register(&fm_st_proto);
 	if (ret == -EINPROGRESS) {
 	if (ret == -EINPROGRESS) {
@@ -1532,7 +1537,7 @@ u32 fmc_prepare(struct fmdev *fmdev)
 		g_st_write = fm_st_proto.write;
 		g_st_write = fm_st_proto.write;
 	} else {
 	} else {
 		fmerr("Failed to get ST write func pointer\n");
 		fmerr("Failed to get ST write func pointer\n");
-		ret = st_unregister(ST_FM);
+		ret = st_unregister(&fm_st_proto);
 		if (ret < 0)
 		if (ret < 0)
 			fmerr("st_unregister failed %d\n", ret);
 			fmerr("st_unregister failed %d\n", ret);
 		return -EAGAIN;
 		return -EAGAIN;
@@ -1586,6 +1591,7 @@ u32 fmc_prepare(struct fmdev *fmdev)
  */
  */
 u32 fmc_release(struct fmdev *fmdev)
 u32 fmc_release(struct fmdev *fmdev)
 {
 {
+	static struct st_proto_s fm_st_proto;
 	u32 ret;
 	u32 ret;
 
 
 	if (!test_bit(FM_CORE_READY, &fmdev->flag)) {
 	if (!test_bit(FM_CORE_READY, &fmdev->flag)) {
@@ -1604,7 +1610,11 @@ u32 fmc_release(struct fmdev *fmdev)
 	fmdev->resp_comp = NULL;
 	fmdev->resp_comp = NULL;
 	fmdev->rx.freq = 0;
 	fmdev->rx.freq = 0;
 
 
-	ret = st_unregister(ST_FM);
+	memset(&fm_st_proto, 0, sizeof(fm_st_proto));
+	fm_st_proto.chnl_id = 0x08;
+
+	ret = st_unregister(&fm_st_proto);
+
 	if (ret < 0)
 	if (ret < 0)
 		fmerr("Failed to de-register FM from ST %d\n", ret);
 		fmerr("Failed to de-register FM from ST %d\n", ret);
 	else
 	else

+ 1 - 0
drivers/staging/altera-stapl/altera-jtag.c

@@ -23,6 +23,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
  */
 
 
+#include <linux/delay.h>
 #include <linux/firmware.h>
 #include <linux/firmware.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <staging/altera.h>
 #include <staging/altera.h>