diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-29 17:25:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 12:59:50 -0500 |
commit | da2bbdcc3838ce75c30bda8c3f9a6e55ece47ee1 (patch) | |
tree | 70c61e2415d60a878627a6d47c831dbfb767fd71 | |
parent | aa459e6a2e8c9c5447b951f8f93e2ea76f65d104 (diff) |
USB: avoid needless address-taking of function parameters
There's no need to take the address of the function params or local variables
when the direct value byteswapping routines are available.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/usb/kaweth.c | 6 | ||||
-rw-r--r-- | drivers/net/usb/pegasus.c | 12 | ||||
-rw-r--r-- | drivers/usb/core/message.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.c | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 2ee034f70d1c..3073ca25a0b0 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -283,9 +283,9 @@ static int kaweth_control(struct kaweth_device *kaweth, | |||
283 | 283 | ||
284 | dr->bRequestType= requesttype; | 284 | dr->bRequestType= requesttype; |
285 | dr->bRequest = request; | 285 | dr->bRequest = request; |
286 | dr->wValue = cpu_to_le16p(&value); | 286 | dr->wValue = cpu_to_le16(value); |
287 | dr->wIndex = cpu_to_le16p(&index); | 287 | dr->wIndex = cpu_to_le16(index); |
288 | dr->wLength = cpu_to_le16p(&size); | 288 | dr->wLength = cpu_to_le16(size); |
289 | 289 | ||
290 | return kaweth_internal_control_msg(kaweth->dev, | 290 | return kaweth_internal_control_msg(kaweth->dev, |
291 | pipe, | 291 | pipe, |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 166880c113d6..d9241f1c0803 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -150,8 +150,8 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
150 | pegasus->dr.bRequestType = PEGASUS_REQT_READ; | 150 | pegasus->dr.bRequestType = PEGASUS_REQT_READ; |
151 | pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS; | 151 | pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS; |
152 | pegasus->dr.wValue = cpu_to_le16(0); | 152 | pegasus->dr.wValue = cpu_to_le16(0); |
153 | pegasus->dr.wIndex = cpu_to_le16p(&indx); | 153 | pegasus->dr.wIndex = cpu_to_le16(indx); |
154 | pegasus->dr.wLength = cpu_to_le16p(&size); | 154 | pegasus->dr.wLength = cpu_to_le16(size); |
155 | pegasus->ctrl_urb->transfer_buffer_length = size; | 155 | pegasus->ctrl_urb->transfer_buffer_length = size; |
156 | 156 | ||
157 | usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb, | 157 | usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb, |
@@ -208,8 +208,8 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
208 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; | 208 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; |
209 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS; | 209 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS; |
210 | pegasus->dr.wValue = cpu_to_le16(0); | 210 | pegasus->dr.wValue = cpu_to_le16(0); |
211 | pegasus->dr.wIndex = cpu_to_le16p(&indx); | 211 | pegasus->dr.wIndex = cpu_to_le16(indx); |
212 | pegasus->dr.wLength = cpu_to_le16p(&size); | 212 | pegasus->dr.wLength = cpu_to_le16(size); |
213 | pegasus->ctrl_urb->transfer_buffer_length = size; | 213 | pegasus->ctrl_urb->transfer_buffer_length = size; |
214 | 214 | ||
215 | usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb, | 215 | usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb, |
@@ -261,7 +261,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
261 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; | 261 | pegasus->dr.bRequestType = PEGASUS_REQT_WRITE; |
262 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REG; | 262 | pegasus->dr.bRequest = PEGASUS_REQ_SET_REG; |
263 | pegasus->dr.wValue = cpu_to_le16(data); | 263 | pegasus->dr.wValue = cpu_to_le16(data); |
264 | pegasus->dr.wIndex = cpu_to_le16p(&indx); | 264 | pegasus->dr.wIndex = cpu_to_le16(indx); |
265 | pegasus->dr.wLength = cpu_to_le16(1); | 265 | pegasus->dr.wLength = cpu_to_le16(1); |
266 | pegasus->ctrl_urb->transfer_buffer_length = 1; | 266 | pegasus->ctrl_urb->transfer_buffer_length = 1; |
267 | 267 | ||
@@ -476,7 +476,7 @@ static inline void get_node_id(pegasus_t * pegasus, __u8 * id) | |||
476 | 476 | ||
477 | for (i = 0; i < 3; i++) { | 477 | for (i = 0; i < 3; i++) { |
478 | read_eprom_word(pegasus, i, &w16); | 478 | read_eprom_word(pegasus, i, &w16); |
479 | ((__le16 *) id)[i] = cpu_to_le16p(&w16); | 479 | ((__le16 *) id)[i] = cpu_to_le16(w16); |
480 | } | 480 | } |
481 | } | 481 | } |
482 | 482 | ||
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 6d1048faf08e..cc47d36798b1 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -139,9 +139,9 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, | |||
139 | 139 | ||
140 | dr->bRequestType = requesttype; | 140 | dr->bRequestType = requesttype; |
141 | dr->bRequest = request; | 141 | dr->bRequest = request; |
142 | dr->wValue = cpu_to_le16p(&value); | 142 | dr->wValue = cpu_to_le16(value); |
143 | dr->wIndex = cpu_to_le16p(&index); | 143 | dr->wIndex = cpu_to_le16(index); |
144 | dr->wLength = cpu_to_le16p(&size); | 144 | dr->wLength = cpu_to_le16(size); |
145 | 145 | ||
146 | /* dbg("usb_control_msg"); */ | 146 | /* dbg("usb_control_msg"); */ |
147 | 147 | ||
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 8ae70de2c37d..12c6d83b218c 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -669,7 +669,7 @@ fill_dma_desc (struct net2280_ep *ep, struct net2280_request *req, int valid) | |||
669 | 669 | ||
670 | /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */ | 670 | /* 2280 may be polling VALID_BIT through ep->dma->dmadesc */ |
671 | wmb (); | 671 | wmb (); |
672 | td->dmacount = cpu_to_le32p (&dmacount); | 672 | td->dmacount = cpu_to_le32(dmacount); |
673 | } | 673 | } |
674 | 674 | ||
675 | static const u32 dmactl_default = | 675 | static const u32 dmactl_default = |