public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] small fix to pegasus.c
@ 2003-03-31  0:10 Paul Mackerras
  2003-04-05  0:14 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2003-03-31  0:10 UTC (permalink / raw)
  To: petkan; +Cc: greg, linux-kernel

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-05  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31  0:10 [PATCH] small fix to pegasus.c Paul Mackerras
2003-04-05  0:14 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox