[PATCH] small fix to pegasus.c

Paul Mackerras (paulus@samba.org)
Mon, 31 Mar 2003 10:10:39 +1000 (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/