[PATCH 5/6] USB: sisusbvga: change sisusb_read_mem_bulk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Changming Liu <liu.changm@xxxxxxxxxxxxxxxx>

change sisusb_read_mem_bulk userbuffer,kernbuffer
and local buf from char to u8.

Also it's called by sisusb_read_memory sisusb_testreadwrite
and sisusb_read. Change their parameter types accordingly.

Signed-off-by: Changming Liu <liu.changm@xxxxxxxxxxxxxxxx>
---
 drivers/usb/misc/sisusbvga/sisusb.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 9e858530c4ed..1f21db40fdb5 100755
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -1104,11 +1104,11 @@ static int sisusb_read_memio_long(struct sisusb_usb_data *sisusb, int type,
 }
 
 static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
-		char *kernbuffer, int length, char __user *userbuffer,
+		u8 *kernbuffer, int length, u8 __user *userbuffer,
 		ssize_t *bytes_read)
 {
 	int ret = 0;
-	char buf[4];
+	u8 buf[4];
 	u16 swap16;
 	u32 swap32;
 
@@ -1293,7 +1293,7 @@ int sisusb_copy_memory(struct sisusb_usb_data *sisusb, u8 *src,
 }
 
 #ifdef SISUSBENDIANTEST
-static int sisusb_read_memory(struct sisusb_usb_data *sisusb, char *dest,
+static int sisusb_read_memory(struct sisusb_usb_data *sisusb, u8 *dest,
 		u32 src, int length)
 {
 	size_t dummy;
@@ -1308,7 +1308,7 @@ static int sisusb_read_memory(struct sisusb_usb_data *sisusb, char *dest,
 static void sisusb_testreadwrite(struct sisusb_usb_data *sisusb)
 {
 	static u8 srcbuffer[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 };
-	char destbuffer[10];
+	u8 destbuffer[10];
 	int i, j;
 
 	sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7);
@@ -2479,7 +2479,7 @@ static int sisusb_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static ssize_t sisusb_read(struct file *file, char __user *buffer,
+static ssize_t sisusb_read(struct file *file, u8 __user *buffer,
 		size_t count, loff_t *ppos)
 {
 	struct sisusb_usb_data *sisusb;
-- 
2.17.1




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux