Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Olav Kongas and committed by
Greg Kroah-Hartman
5db539e4 17f8bb73

+81 -75
+1 -1
drivers/usb/core/buffer.c
··· 106 106 void *hcd_buffer_alloc ( 107 107 struct usb_bus *bus, 108 108 size_t size, 109 - int mem_flags, 109 + unsigned mem_flags, 110 110 dma_addr_t *dma 111 111 ) 112 112 {
+1 -1
drivers/usb/core/hcd.c
··· 1112 1112 * expects usb_submit_urb() to have sanity checked and conditioned all 1113 1113 * inputs in the urb 1114 1114 */ 1115 - static int hcd_submit_urb (struct urb *urb, int mem_flags) 1115 + static int hcd_submit_urb (struct urb *urb, unsigned mem_flags) 1116 1116 { 1117 1117 int status; 1118 1118 struct usb_hcd *hcd = urb->dev->bus->hcpriv;
+4 -4
drivers/usb/core/hcd.h
··· 142 142 143 143 struct usb_operations { 144 144 int (*get_frame_number) (struct usb_device *usb_dev); 145 - int (*submit_urb) (struct urb *urb, int mem_flags); 145 + int (*submit_urb) (struct urb *urb, unsigned mem_flags); 146 146 int (*unlink_urb) (struct urb *urb, int status); 147 147 148 148 /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */ 149 149 void *(*buffer_alloc)(struct usb_bus *bus, size_t size, 150 - int mem_flags, 150 + unsigned mem_flags, 151 151 dma_addr_t *dma); 152 152 void (*buffer_free)(struct usb_bus *bus, size_t size, 153 153 void *addr, dma_addr_t dma); ··· 200 200 int (*urb_enqueue) (struct usb_hcd *hcd, 201 201 struct usb_host_endpoint *ep, 202 202 struct urb *urb, 203 - int mem_flags); 203 + unsigned mem_flags); 204 204 int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb); 205 205 206 206 /* hw synch, freeing endpoint resources that urb_dequeue can't */ ··· 247 247 void hcd_buffer_destroy (struct usb_hcd *hcd); 248 248 249 249 void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, 250 - int mem_flags, dma_addr_t *dma); 250 + unsigned mem_flags, dma_addr_t *dma); 251 251 void hcd_buffer_free (struct usb_bus *bus, size_t size, 252 252 void *addr, dma_addr_t dma); 253 253
+1 -1
drivers/usb/core/message.c
··· 320 320 struct scatterlist *sg, 321 321 int nents, 322 322 size_t length, 323 - int mem_flags 323 + unsigned mem_flags 324 324 ) 325 325 { 326 326 int i;
+2 -2
drivers/usb/core/urb.c
··· 60 60 * 61 61 * The driver must call usb_free_urb() when it is finished with the urb. 62 62 */ 63 - struct urb *usb_alloc_urb(int iso_packets, int mem_flags) 63 + struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags) 64 64 { 65 65 struct urb *urb; 66 66 ··· 224 224 * GFP_NOIO, unless b) or c) apply 225 225 * 226 226 */ 227 - int usb_submit_urb(struct urb *urb, int mem_flags) 227 + int usb_submit_urb(struct urb *urb, unsigned mem_flags) 228 228 { 229 229 int pipe, temp, max; 230 230 struct usb_device *dev;
+1 -1
drivers/usb/core/usb.c
··· 1129 1129 void *usb_buffer_alloc ( 1130 1130 struct usb_device *dev, 1131 1131 size_t size, 1132 - int mem_flags, 1132 + unsigned mem_flags, 1133 1133 dma_addr_t *dma 1134 1134 ) 1135 1135 {
+5 -4
drivers/usb/gadget/dummy_hcd.c
··· 470 470 } 471 471 472 472 static struct usb_request * 473 - dummy_alloc_request (struct usb_ep *_ep, int mem_flags) 473 + dummy_alloc_request (struct usb_ep *_ep, unsigned mem_flags) 474 474 { 475 475 struct dummy_ep *ep; 476 476 struct dummy_request *req; ··· 507 507 struct usb_ep *_ep, 508 508 unsigned bytes, 509 509 dma_addr_t *dma, 510 - int mem_flags 510 + unsigned mem_flags 511 511 ) { 512 512 char *retval; 513 513 struct dummy_ep *ep; ··· 540 540 } 541 541 542 542 static int 543 - dummy_queue (struct usb_ep *_ep, struct usb_request *_req, int mem_flags) 543 + dummy_queue (struct usb_ep *_ep, struct usb_request *_req, 544 + unsigned mem_flags) 544 545 { 545 546 struct dummy_ep *ep; 546 547 struct dummy_request *req; ··· 999 998 struct usb_hcd *hcd, 1000 999 struct usb_host_endpoint *ep, 1001 1000 struct urb *urb, 1002 - int mem_flags 1001 + unsigned mem_flags 1003 1002 ) { 1004 1003 struct dummy *dum; 1005 1004 struct urbp *urbp;
+9 -9
drivers/usb/gadget/ether.c
··· 945 945 946 946 /*-------------------------------------------------------------------------*/ 947 947 948 - static void eth_start (struct eth_dev *dev, int gfp_flags); 949 - static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags); 948 + static void eth_start (struct eth_dev *dev, unsigned gfp_flags); 949 + static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags); 950 950 951 951 static int 952 - set_ether_config (struct eth_dev *dev, int gfp_flags) 952 + set_ether_config (struct eth_dev *dev, unsigned gfp_flags) 953 953 { 954 954 int result = 0; 955 955 struct usb_gadget *gadget = dev->gadget; ··· 1079 1079 * that returns config descriptors, and altsetting code. 1080 1080 */ 1081 1081 static int 1082 - eth_set_config (struct eth_dev *dev, unsigned number, int gfp_flags) 1082 + eth_set_config (struct eth_dev *dev, unsigned number, unsigned gfp_flags) 1083 1083 { 1084 1084 int result = 0; 1085 1085 struct usb_gadget *gadget = dev->gadget; ··· 1596 1596 static void rx_complete (struct usb_ep *ep, struct usb_request *req); 1597 1597 1598 1598 static int 1599 - rx_submit (struct eth_dev *dev, struct usb_request *req, int gfp_flags) 1599 + rx_submit (struct eth_dev *dev, struct usb_request *req, unsigned gfp_flags) 1600 1600 { 1601 1601 struct sk_buff *skb; 1602 1602 int retval = -ENOMEM; ··· 1722 1722 } 1723 1723 1724 1724 static int prealloc (struct list_head *list, struct usb_ep *ep, 1725 - unsigned n, int gfp_flags) 1725 + unsigned n, unsigned gfp_flags) 1726 1726 { 1727 1727 unsigned i; 1728 1728 struct usb_request *req; ··· 1761 1761 return 0; 1762 1762 } 1763 1763 1764 - static int alloc_requests (struct eth_dev *dev, unsigned n, int gfp_flags) 1764 + static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags) 1765 1765 { 1766 1766 int status; 1767 1767 ··· 1777 1777 return status; 1778 1778 } 1779 1779 1780 - static void rx_fill (struct eth_dev *dev, int gfp_flags) 1780 + static void rx_fill (struct eth_dev *dev, unsigned gfp_flags) 1781 1781 { 1782 1782 struct usb_request *req; 1783 1783 unsigned long flags; ··· 2022 2022 2023 2023 #endif /* RNDIS */ 2024 2024 2025 - static void eth_start (struct eth_dev *dev, int gfp_flags) 2025 + static void eth_start (struct eth_dev *dev, unsigned gfp_flags) 2026 2026 { 2027 2027 DEBUG (dev, "%s\n", __FUNCTION__); 2028 2028
+3 -3
drivers/usb/gadget/goku_udc.c
··· 269 269 /*-------------------------------------------------------------------------*/ 270 270 271 271 static struct usb_request * 272 - goku_alloc_request(struct usb_ep *_ep, int gfp_flags) 272 + goku_alloc_request(struct usb_ep *_ep, unsigned gfp_flags) 273 273 { 274 274 struct goku_request *req; 275 275 ··· 327 327 */ 328 328 static void * 329 329 goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes, 330 - dma_addr_t *dma, int gfp_flags) 330 + dma_addr_t *dma, unsigned gfp_flags) 331 331 { 332 332 void *retval; 333 333 struct goku_ep *ep; ··· 789 789 /*-------------------------------------------------------------------------*/ 790 790 791 791 static int 792 - goku_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags) 792 + goku_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) 793 793 { 794 794 struct goku_request *req; 795 795 struct goku_ep *ep;
+3 -3
drivers/usb/gadget/lh7a40x_udc.c
··· 1106 1106 } 1107 1107 1108 1108 static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, 1109 - int gfp_flags) 1109 + unsigned gfp_flags) 1110 1110 { 1111 1111 struct lh7a40x_request *req; 1112 1112 ··· 1134 1134 } 1135 1135 1136 1136 static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes, 1137 - dma_addr_t * dma, int gfp_flags) 1137 + dma_addr_t * dma, unsigned gfp_flags) 1138 1138 { 1139 1139 char *retval; 1140 1140 ··· 1158 1158 * NOTE: Sets INDEX register 1159 1159 */ 1160 1160 static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req, 1161 - int gfp_flags) 1161 + unsigned gfp_flags) 1162 1162 { 1163 1163 struct lh7a40x_request *req; 1164 1164 struct lh7a40x_ep *ep;
+3 -3
drivers/usb/gadget/net2280.c
··· 376 376 /*-------------------------------------------------------------------------*/ 377 377 378 378 static struct usb_request * 379 - net2280_alloc_request (struct usb_ep *_ep, int gfp_flags) 379 + net2280_alloc_request (struct usb_ep *_ep, unsigned gfp_flags) 380 380 { 381 381 struct net2280_ep *ep; 382 382 struct net2280_request *req; ··· 463 463 struct usb_ep *_ep, 464 464 unsigned bytes, 465 465 dma_addr_t *dma, 466 - int gfp_flags 466 + unsigned gfp_flags 467 467 ) 468 468 { 469 469 void *retval; ··· 897 897 /*-------------------------------------------------------------------------*/ 898 898 899 899 static int 900 - net2280_queue (struct usb_ep *_ep, struct usb_request *_req, int gfp_flags) 900 + net2280_queue (struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) 901 901 { 902 902 struct net2280_request *req; 903 903 struct net2280_ep *ep;
+3 -3
drivers/usb/gadget/omap_udc.c
··· 269 269 /*-------------------------------------------------------------------------*/ 270 270 271 271 static struct usb_request * 272 - omap_alloc_request(struct usb_ep *ep, int gfp_flags) 272 + omap_alloc_request(struct usb_ep *ep, unsigned gfp_flags) 273 273 { 274 274 struct omap_req *req; 275 275 ··· 298 298 struct usb_ep *_ep, 299 299 unsigned bytes, 300 300 dma_addr_t *dma, 301 - int gfp_flags 301 + unsigned gfp_flags 302 302 ) 303 303 { 304 304 void *retval; ··· 937 937 /*-------------------------------------------------------------------------*/ 938 938 939 939 static int 940 - omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags) 940 + omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) 941 941 { 942 942 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); 943 943 struct omap_req *req = container_of(_req, struct omap_req, req);
+3 -3
drivers/usb/gadget/pxa2xx_udc.c
··· 332 332 * pxa2xx_ep_alloc_request - allocate a request data structure 333 333 */ 334 334 static struct usb_request * 335 - pxa2xx_ep_alloc_request (struct usb_ep *_ep, int gfp_flags) 335 + pxa2xx_ep_alloc_request (struct usb_ep *_ep, unsigned gfp_flags) 336 336 { 337 337 struct pxa2xx_request *req; 338 338 ··· 367 367 */ 368 368 static void * 369 369 pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, 370 - dma_addr_t *dma, int gfp_flags) 370 + dma_addr_t *dma, unsigned gfp_flags) 371 371 { 372 372 char *retval; 373 373 ··· 874 874 /*-------------------------------------------------------------------------*/ 875 875 876 876 static int 877 - pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags) 877 + pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) 878 878 { 879 879 struct pxa2xx_request *req; 880 880 struct pxa2xx_ep *ep;
+4 -4
drivers/usb/gadget/zero.c
··· 612 612 } 613 613 614 614 static struct usb_request * 615 - source_sink_start_ep (struct usb_ep *ep, int gfp_flags) 615 + source_sink_start_ep (struct usb_ep *ep, unsigned gfp_flags) 616 616 { 617 617 struct usb_request *req; 618 618 int status; ··· 640 640 } 641 641 642 642 static int 643 - set_source_sink_config (struct zero_dev *dev, int gfp_flags) 643 + set_source_sink_config (struct zero_dev *dev, unsigned gfp_flags) 644 644 { 645 645 int result = 0; 646 646 struct usb_ep *ep; ··· 744 744 } 745 745 746 746 static int 747 - set_loopback_config (struct zero_dev *dev, int gfp_flags) 747 + set_loopback_config (struct zero_dev *dev, unsigned gfp_flags) 748 748 { 749 749 int result = 0; 750 750 struct usb_ep *ep; ··· 845 845 * by limiting configuration choices (like the pxa2xx). 846 846 */ 847 847 static int 848 - zero_set_config (struct zero_dev *dev, unsigned number, int gfp_flags) 848 + zero_set_config (struct zero_dev *dev, unsigned number, unsigned gfp_flags) 849 849 { 850 850 int result = 0; 851 851 struct usb_gadget *gadget = dev->gadget;
+1 -1
drivers/usb/host/ehci-hcd.c
··· 960 960 struct usb_hcd *hcd, 961 961 struct usb_host_endpoint *ep, 962 962 struct urb *urb, 963 - int mem_flags 963 + unsigned mem_flags 964 964 ) { 965 965 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 966 966 struct list_head qtd_list;
+1 -1
drivers/usb/host/ehci-q.c
··· 898 898 struct usb_host_endpoint *ep, 899 899 struct urb *urb, 900 900 struct list_head *qtd_list, 901 - int mem_flags 901 + unsigned mem_flags 902 902 ) { 903 903 struct ehci_qtd *qtd; 904 904 int epnum;
+11 -8
drivers/usb/host/ehci-sched.c
··· 588 588 struct usb_host_endpoint *ep, 589 589 struct urb *urb, 590 590 struct list_head *qtd_list, 591 - int mem_flags 591 + unsigned mem_flags 592 592 ) { 593 593 unsigned epnum; 594 594 unsigned long flags; ··· 633 633 /* ehci_iso_stream ops work with both ITD and SITD */ 634 634 635 635 static struct ehci_iso_stream * 636 - iso_stream_alloc (int mem_flags) 636 + iso_stream_alloc (unsigned mem_flags) 637 637 { 638 638 struct ehci_iso_stream *stream; 639 639 ··· 846 846 /* ehci_iso_sched ops can be ITD-only or SITD-only */ 847 847 848 848 static struct ehci_iso_sched * 849 - iso_sched_alloc (unsigned packets, int mem_flags) 849 + iso_sched_alloc (unsigned packets, unsigned mem_flags) 850 850 { 851 851 struct ehci_iso_sched *iso_sched; 852 852 int size = sizeof *iso_sched; ··· 919 919 struct ehci_iso_stream *stream, 920 920 struct ehci_hcd *ehci, 921 921 struct urb *urb, 922 - int mem_flags 922 + unsigned mem_flags 923 923 ) 924 924 { 925 925 struct ehci_itd *itd; ··· 1412 1412 1413 1413 /*-------------------------------------------------------------------------*/ 1414 1414 1415 - static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags) 1415 + static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, 1416 + unsigned mem_flags) 1416 1417 { 1417 1418 int status = -EINVAL; 1418 1419 unsigned long flags; ··· 1524 1523 struct ehci_iso_stream *stream, 1525 1524 struct ehci_hcd *ehci, 1526 1525 struct urb *urb, 1527 - int mem_flags 1526 + unsigned mem_flags 1528 1527 ) 1529 1528 { 1530 1529 struct ehci_sitd *sitd; ··· 1773 1772 } 1774 1773 1775 1774 1776 - static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags) 1775 + static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, 1776 + unsigned mem_flags) 1777 1777 { 1778 1778 int status = -EINVAL; 1779 1779 unsigned long flags; ··· 1824 1822 #else 1825 1823 1826 1824 static inline int 1827 - sitd_submit (struct ehci_hcd *ehci, struct urb *urb, int mem_flags) 1825 + sitd_submit (struct ehci_hcd *ehci, struct urb *urb, 1826 + unsigned mem_flags) 1828 1827 { 1829 1828 ehci_dbg (ehci, "split iso support is disabled\n"); 1830 1829 return -ENOSYS;
+6 -4
drivers/usb/host/hc_crisv10.c
··· 463 463 464 464 static int etrax_remove_from_sb_list(struct urb *urb); 465 465 466 - static void* etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int mem_flags, dma_addr_t *dma); 466 + static void* etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, 467 + unsigned mem_flags, dma_addr_t *dma); 467 468 static void etrax_usb_buffer_free(struct usb_bus *bus, size_t size, void *addr, dma_addr_t dma); 468 469 469 470 static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid); ··· 477 476 static int etrax_usb_submit_intr_urb(struct urb *urb); 478 477 static int etrax_usb_submit_isoc_urb(struct urb *urb); 479 478 480 - static int etrax_usb_submit_urb(struct urb *urb, int mem_flags); 479 + static int etrax_usb_submit_urb(struct urb *urb, unsigned mem_flags); 481 480 static int etrax_usb_unlink_urb(struct urb *urb, int status); 482 481 static int etrax_usb_get_frame_number(struct usb_device *usb_dev); 483 482 ··· 1263 1262 return -1; 1264 1263 } 1265 1264 1266 - static int etrax_usb_submit_urb(struct urb *urb, int mem_flags) 1265 + static int etrax_usb_submit_urb(struct urb *urb, unsigned mem_flags) 1267 1266 { 1268 1267 etrax_hc_t *hc; 1269 1268 int ret = -EINVAL; ··· 4278 4277 } 4279 4278 4280 4279 static void* 4281 - etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, int mem_flags, dma_addr_t *dma) 4280 + etrax_usb_buffer_alloc(struct usb_bus* bus, size_t size, 4281 + unsigned mem_flags, dma_addr_t *dma) 4282 4282 { 4283 4283 return kmalloc(size, mem_flags); 4284 4284 }
+2 -2
drivers/usb/host/isp116x-hcd.c
··· 693 693 694 694 static int isp116x_urb_enqueue(struct usb_hcd *hcd, 695 695 struct usb_host_endpoint *hep, struct urb *urb, 696 - int mem_flags) 696 + unsigned mem_flags) 697 697 { 698 698 struct isp116x *isp116x = hcd_to_isp116x(hcd); 699 699 struct usb_device *udev = urb->dev; ··· 715 715 } 716 716 /* avoid all allocations within spinlocks: request or endpoint */ 717 717 if (!hep->hcpriv) { 718 - ep = kcalloc(1, sizeof *ep, (__force unsigned)mem_flags); 718 + ep = kcalloc(1, sizeof *ep, mem_flags); 719 719 if (!ep) 720 720 return -ENOMEM; 721 721 }
+1 -1
drivers/usb/host/ohci-hcd.c
··· 180 180 struct usb_hcd *hcd, 181 181 struct usb_host_endpoint *ep, 182 182 struct urb *urb, 183 - int mem_flags 183 + unsigned mem_flags 184 184 ) { 185 185 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 186 186 struct ed *ed;
+2 -2
drivers/usb/host/ohci-mem.c
··· 84 84 85 85 /* TDs ... */ 86 86 static struct td * 87 - td_alloc (struct ohci_hcd *hc, int mem_flags) 87 + td_alloc (struct ohci_hcd *hc, unsigned mem_flags) 88 88 { 89 89 dma_addr_t dma; 90 90 struct td *td; ··· 118 118 119 119 /* EDs ... */ 120 120 static struct ed * 121 - ed_alloc (struct ohci_hcd *hc, int mem_flags) 121 + ed_alloc (struct ohci_hcd *hc, unsigned mem_flags) 122 122 { 123 123 dma_addr_t dma; 124 124 struct ed *ed;
+1 -1
drivers/usb/host/sl811-hcd.c
··· 815 815 struct usb_hcd *hcd, 816 816 struct usb_host_endpoint *hep, 817 817 struct urb *urb, 818 - int mem_flags 818 + unsigned mem_flags 819 819 ) { 820 820 struct sl811 *sl811 = hcd_to_sl811(hcd); 821 821 struct usb_device *udev = urb->dev;
+1 -1
drivers/usb/host/uhci-q.c
··· 1164 1164 1165 1165 static int uhci_urb_enqueue(struct usb_hcd *hcd, 1166 1166 struct usb_host_endpoint *ep, 1167 - struct urb *urb, int mem_flags) 1167 + struct urb *urb, unsigned mem_flags) 1168 1168 { 1169 1169 int ret; 1170 1170 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+2 -2
drivers/usb/net/kaweth.c
··· 477 477 } 478 478 479 479 static void kaweth_usb_receive(struct urb *, struct pt_regs *regs); 480 - static int kaweth_resubmit_rx_urb(struct kaweth_device *, int); 480 + static int kaweth_resubmit_rx_urb(struct kaweth_device *, unsigned); 481 481 482 482 /**************************************************************** 483 483 int_callback ··· 550 550 * kaweth_resubmit_rx_urb 551 551 ****************************************************************/ 552 552 static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth, 553 - int mem_flags) 553 + unsigned mem_flags) 554 554 { 555 555 int result; 556 556
+4 -4
include/linux/usb.h
··· 938 938 } 939 939 940 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 942 extern void usb_free_urb(struct urb *urb); 943 943 #define usb_put_urb usb_free_urb 944 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 946 extern int usb_unlink_urb(struct urb *urb); 947 947 extern void usb_kill_urb(struct urb *urb); 948 948 949 949 #define HAVE_USB_BUFFERS 950 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 952 void usb_buffer_free (struct usb_device *dev, size_t size, 953 953 void *addr, dma_addr_t dma); 954 954 ··· 1055 1055 struct scatterlist *sg, 1056 1056 int nents, 1057 1057 size_t length, 1058 - int mem_flags 1058 + unsigned mem_flags 1059 1059 ); 1060 1060 void usb_sg_cancel (struct usb_sg_request *io); 1061 1061 void usb_sg_wait (struct usb_sg_request *io);
+6 -6
include/linux/usb_gadget.h
··· 107 107 int (*disable) (struct usb_ep *ep); 108 108 109 109 struct usb_request *(*alloc_request) (struct usb_ep *ep, 110 - int gfp_flags); 110 + unsigned gfp_flags); 111 111 void (*free_request) (struct usb_ep *ep, struct usb_request *req); 112 112 113 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 115 void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, 116 116 unsigned bytes); 117 117 // NOTE: on 2.6, drivers may also use dma_map() and 118 118 // dma_sync_single_*() to directly manage dma overhead. 119 119 120 120 int (*queue) (struct usb_ep *ep, struct usb_request *req, 121 - int gfp_flags); 121 + unsigned gfp_flags); 122 122 int (*dequeue) (struct usb_ep *ep, struct usb_request *req); 123 123 124 124 int (*set_halt) (struct usb_ep *ep, int value); ··· 214 214 * Returns the request, or null if one could not be allocated. 215 215 */ 216 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 219 return ep->ops->alloc_request (ep, gfp_flags); 220 220 } ··· 254 254 */ 255 255 static inline void * 256 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 259 return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); 260 260 } ··· 330 330 * reported when the usb peripheral is disconnected. 331 331 */ 332 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 335 return ep->ops->queue (ep, req, gfp_flags); 336 336 }