diff options
author | Olav Kongas <ok@artecdesign.ee> | 2005-06-23 13:25:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-07-12 14:52:56 -0400 |
commit | 5db539e49fc7471e23bf3c94ca304f008cb7b7f3 (patch) | |
tree | 5b6bdd7f27efdd5fcd7efffa9a612afece17f533 /include | |
parent | 17f8bb7312fa9b00f80c3c0f8d5a5d698eb97bbd (diff) |
[PATCH] USB: Fix kmalloc's flags type in USB
Greg,
This patch fixes the kmalloc() flags argument type in USB
subsystem; hopefully all of its occurences. The patch was
made against patch-2.6.12-git2 from Jun 20.
Cleanup of flags for kmalloc() in USB subsystem.
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb.h | 8 | ||||
-rw-r--r-- | include/linux/usb_gadget.h | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index eb282b581546..724637792996 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -938,17 +938,17 @@ static inline void usb_fill_int_urb (struct urb *urb, | |||
938 | } | 938 | } |
939 | 939 | ||
940 | extern void usb_init_urb(struct urb *urb); | 940 | extern void usb_init_urb(struct urb *urb); |
941 | extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags); | 941 | extern struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags); |
942 | extern void usb_free_urb(struct urb *urb); | 942 | extern void usb_free_urb(struct urb *urb); |
943 | #define usb_put_urb usb_free_urb | 943 | #define usb_put_urb usb_free_urb |
944 | extern struct urb *usb_get_urb(struct urb *urb); | 944 | extern struct urb *usb_get_urb(struct urb *urb); |
945 | extern int usb_submit_urb(struct urb *urb, int mem_flags); | 945 | extern int usb_submit_urb(struct urb *urb, unsigned mem_flags); |
946 | extern int usb_unlink_urb(struct urb *urb); | 946 | extern int usb_unlink_urb(struct urb *urb); |
947 | extern void usb_kill_urb(struct urb *urb); | 947 | extern void usb_kill_urb(struct urb *urb); |
948 | 948 | ||
949 | #define HAVE_USB_BUFFERS | 949 | #define HAVE_USB_BUFFERS |
950 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, | 950 | void *usb_buffer_alloc (struct usb_device *dev, size_t size, |
951 | int mem_flags, dma_addr_t *dma); | 951 | unsigned mem_flags, dma_addr_t *dma); |
952 | void usb_buffer_free (struct usb_device *dev, size_t size, | 952 | void usb_buffer_free (struct usb_device *dev, size_t size, |
953 | void *addr, dma_addr_t dma); | 953 | void *addr, dma_addr_t dma); |
954 | 954 | ||
@@ -1055,7 +1055,7 @@ int usb_sg_init ( | |||
1055 | struct scatterlist *sg, | 1055 | struct scatterlist *sg, |
1056 | int nents, | 1056 | int nents, |
1057 | size_t length, | 1057 | size_t length, |
1058 | int mem_flags | 1058 | unsigned mem_flags |
1059 | ); | 1059 | ); |
1060 | void usb_sg_cancel (struct usb_sg_request *io); | 1060 | void usb_sg_cancel (struct usb_sg_request *io); |
1061 | void usb_sg_wait (struct usb_sg_request *io); | 1061 | void usb_sg_wait (struct usb_sg_request *io); |
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index b00f127cb447..71e608607324 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -107,18 +107,18 @@ struct usb_ep_ops { | |||
107 | int (*disable) (struct usb_ep *ep); | 107 | int (*disable) (struct usb_ep *ep); |
108 | 108 | ||
109 | struct usb_request *(*alloc_request) (struct usb_ep *ep, | 109 | struct usb_request *(*alloc_request) (struct usb_ep *ep, |
110 | int gfp_flags); | 110 | unsigned gfp_flags); |
111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); | 111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); |
112 | 112 | ||
113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, | 113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, |
114 | dma_addr_t *dma, int gfp_flags); | 114 | dma_addr_t *dma, unsigned gfp_flags); |
115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, | 115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, |
116 | unsigned bytes); | 116 | unsigned bytes); |
117 | // NOTE: on 2.6, drivers may also use dma_map() and | 117 | // NOTE: on 2.6, drivers may also use dma_map() and |
118 | // dma_sync_single_*() to directly manage dma overhead. | 118 | // dma_sync_single_*() to directly manage dma overhead. |
119 | 119 | ||
120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, | 120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, |
121 | int gfp_flags); | 121 | unsigned gfp_flags); |
122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
123 | 123 | ||
124 | int (*set_halt) (struct usb_ep *ep, int value); | 124 | int (*set_halt) (struct usb_ep *ep, int value); |
@@ -214,7 +214,7 @@ usb_ep_disable (struct usb_ep *ep) | |||
214 | * Returns the request, or null if one could not be allocated. | 214 | * Returns the request, or null if one could not be allocated. |
215 | */ | 215 | */ |
216 | static inline struct usb_request * | 216 | static inline struct usb_request * |
217 | usb_ep_alloc_request (struct usb_ep *ep, int gfp_flags) | 217 | usb_ep_alloc_request (struct usb_ep *ep, unsigned gfp_flags) |
218 | { | 218 | { |
219 | return ep->ops->alloc_request (ep, gfp_flags); | 219 | return ep->ops->alloc_request (ep, gfp_flags); |
220 | } | 220 | } |
@@ -254,7 +254,7 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
254 | */ | 254 | */ |
255 | static inline void * | 255 | static inline void * |
256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, | 256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, |
257 | int gfp_flags) | 257 | unsigned gfp_flags) |
258 | { | 258 | { |
259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); | 259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); |
260 | } | 260 | } |
@@ -330,7 +330,7 @@ usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) | |||
330 | * reported when the usb peripheral is disconnected. | 330 | * reported when the usb peripheral is disconnected. |
331 | */ | 331 | */ |
332 | static inline int | 332 | static inline int |
333 | usb_ep_queue (struct usb_ep *ep, struct usb_request *req, int gfp_flags) | 333 | usb_ep_queue (struct usb_ep *ep, struct usb_request *req, unsigned gfp_flags) |
334 | { | 334 | { |
335 | return ep->ops->queue (ep, req, gfp_flags); | 335 | return ep->ops->queue (ep, req, gfp_flags); |
336 | } | 336 | } |