[PATCH] small fix to pegasus.c

From: Paul Mackerras (paulus@samba.org)
Date: Sun Mar 30 2003 - 19:10:39 EST


Using cpu_to_le16p on a __u8 variable is wrong, and gives a compile
warning on PPC. It's better to use cpu_to_le16 in this case. Here is
a patch to fix it. Please apply.

Paul.

diff -urN linux-2.5/drivers/usb/net/pegasus.c pmac-2.5/drivers/usb/net/pegasus.c
--- linux-2.5/drivers/usb/net/pegasus.c 2003-03-21 19:48:22.000000000 +1100
+++ pmac-2.5/drivers/usb/net/pegasus.c 2003-03-21 20:49:46.000000000 +1100
@@ -233,7 +233,7 @@
 
         pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
         pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
- pegasus->dr.wValue = cpu_to_le16p(&data);
+ pegasus->dr.wValue = cpu_to_le16(data);
         pegasus->dr.wIndex = cpu_to_le16p(&indx);
         pegasus->dr.wLength = cpu_to_le16(1);
         pegasus->ctrl_urb->transfer_buffer_length = 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:36 EST