aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Dietsche <Gregory.Dietsche@cuw.edu>2011-05-08 23:51:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-10 17:14:59 -0400
commit304b0b572c66bcd89df13e856db16503609c1a24 (patch)
tree4d58921c8310475c2af27314937e45c7656c1de2 /drivers/usb
parent27362d467b3d9955f6ae1737002dac8c0f99fdc7 (diff)
usb: fix warning in usbtest module v2
On amd64 unsigned is not as wide as pointer and this causes a compiler warning. Switching to unsigned long corrects the problem. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/usbtest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 7e0bb2af8e63..c5676202d74a 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -268,9 +268,9 @@ static inline void simple_fill_buf(struct urb *urb)
268 } 268 }
269} 269}
270 270
271static inline unsigned buffer_offset(void *buf) 271static inline unsigned long buffer_offset(void *buf)
272{ 272{
273 return (unsigned)buf & (ARCH_KMALLOC_MINALIGN - 1); 273 return (unsigned long)buf & (ARCH_KMALLOC_MINALIGN - 1);
274} 274}
275 275
276static int check_guard_bytes(struct usbtest_dev *tdev, struct urb *urb) 276static int check_guard_bytes(struct usbtest_dev *tdev, struct urb *urb)
@@ -329,7 +329,7 @@ static int simple_check_buf(struct usbtest_dev *tdev, struct urb *urb)
329 329
330static void simple_free_urb(struct urb *urb) 330static void simple_free_urb(struct urb *urb)
331{ 331{
332 unsigned offset = buffer_offset(urb->transfer_buffer); 332 unsigned long offset = buffer_offset(urb->transfer_buffer);
333 333
334 if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) 334 if (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)
335 usb_free_coherent( 335 usb_free_coherent(