浏览代码

OMAP: DSS2: DSI: change dsi_vc_dcs_read_2 parameters

Change dsi_vc_dcs_read_2() data parameter to two u8 parameters to make the
byte-order clear.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Tomi Valkeinen 15 年之前
父节点
当前提交
0c244f770f
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 1 1
      arch/arm/plat-omap/include/plat/display.h
  2. 6 2
      drivers/video/omap2/dss/dsi.c

+ 1 - 1
arch/arm/plat-omap/include/plat/display.h

@@ -238,7 +238,7 @@ int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param);
 int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
 int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
 int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
 int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
 int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data);
 int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data);
-int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data);
+int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2);
 int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
 int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
 int dsi_vc_send_null(int channel);
 int dsi_vc_send_null(int channel);
 int dsi_vc_send_bta_sync(int channel);
 int dsi_vc_send_bta_sync(int channel);

+ 6 - 2
drivers/video/omap2/dss/dsi.c

@@ -2235,11 +2235,12 @@ int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data)
 }
 }
 EXPORT_SYMBOL(dsi_vc_dcs_read_1);
 EXPORT_SYMBOL(dsi_vc_dcs_read_1);
 
 
-int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data)
+int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2)
 {
 {
+	u8 buf[2];
 	int r;
 	int r;
 
 
-	r = dsi_vc_dcs_read(channel, dcs_cmd, (u8 *)data, 2);
+	r = dsi_vc_dcs_read(channel, dcs_cmd, buf, 2);
 
 
 	if (r < 0)
 	if (r < 0)
 		return r;
 		return r;
@@ -2247,6 +2248,9 @@ int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u16 *data)
 	if (r != 2)
 	if (r != 2)
 		return -EIO;
 		return -EIO;
 
 
+	*data1 = buf[0];
+	*data2 = buf[1];
+
 	return 0;
 	return 0;
 }
 }
 EXPORT_SYMBOL(dsi_vc_dcs_read_2);
 EXPORT_SYMBOL(dsi_vc_dcs_read_2);