Skip to content

Commit 55016f1

Browse files
Al ViroLinus Torvalds
authored andcommitted
[PATCH] gfp_t: drivers/usb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 970a9e7 commit 55016f1

37 files changed

Lines changed: 100 additions & 100 deletions

‎drivers/usb/core/buffer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd)
106106
void *hcd_buffer_alloc (
107107
struct usb_bus *bus,
108108
size_t size,
109-
unsigned mem_flags,
109+
gfp_t mem_flags,
110110
dma_addr_t *dma
111111
)
112112
{

‎drivers/usb/core/hcd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ static void urb_unlink (struct urb *urb)
11121112
* expects usb_submit_urb() to have sanity checked and conditioned all
11131113
* inputs in the urb
11141114
*/
1115-
static int hcd_submit_urb (struct urb *urb, unsigned mem_flags)
1115+
static int hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
11161116
{
11171117
int status;
11181118
struct usb_hcd *hcd = urb->dev->bus->hcpriv;

‎drivers/usb/core/hcd.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ struct hcd_timeout { /* timeouts we allocate */
142142

143143
struct usb_operations {
144144
int (*get_frame_number) (struct usb_device *usb_dev);
145-
int (*submit_urb) (struct urb *urb, unsigned mem_flags);
145+
int (*submit_urb) (struct urb *urb, gfp_t mem_flags);
146146
int (*unlink_urb) (struct urb *urb, int status);
147147

148148
/* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
149149
void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
150-
unsigned mem_flags,
150+
gfp_t mem_flags,
151151
dma_addr_t *dma);
152152
void (*buffer_free)(struct usb_bus *bus, size_t size,
153153
void *addr, dma_addr_t dma);
@@ -200,7 +200,7 @@ struct hc_driver {
200200
int (*urb_enqueue) (struct usb_hcd *hcd,
201201
struct usb_host_endpoint *ep,
202202
struct urb *urb,
203-
unsigned mem_flags);
203+
gfp_t mem_flags);
204204
int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
205205

206206
/* hw synch, freeing endpoint resources that urb_dequeue can't */
@@ -247,7 +247,7 @@ int hcd_buffer_create (struct usb_hcd *hcd);
247247
void hcd_buffer_destroy (struct usb_hcd *hcd);
248248

249249
void *hcd_buffer_alloc (struct usb_bus *bus, size_t size,
250-
unsigned mem_flags, dma_addr_t *dma);
250+
gfp_t mem_flags, dma_addr_t *dma);
251251
void hcd_buffer_free (struct usb_bus *bus, size_t size,
252252
void *addr, dma_addr_t dma);
253253

‎drivers/usb/core/message.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ int usb_sg_init (
321321
struct scatterlist *sg,
322322
int nents,
323323
size_t length,
324-
unsigned mem_flags
324+
gfp_t mem_flags
325325
)
326326
{
327327
int i;

‎drivers/usb/core/urb.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void usb_init_urb(struct urb *urb)
6060
*
6161
* The driver must call usb_free_urb() when it is finished with the urb.
6262
*/
63-
struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags)
63+
struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags)
6464
{
6565
struct urb *urb;
6666

@@ -224,7 +224,7 @@ struct urb * usb_get_urb(struct urb *urb)
224224
* GFP_NOIO, unless b) or c) apply
225225
*
226226
*/
227-
int usb_submit_urb(struct urb *urb, unsigned mem_flags)
227+
int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
228228
{
229229
int pipe, temp, max;
230230
struct usb_device *dev;

‎drivers/usb/core/usb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
11471147
void *usb_buffer_alloc (
11481148
struct usb_device *dev,
11491149
size_t size,
1150-
unsigned mem_flags,
1150+
gfp_t mem_flags,
11511151
dma_addr_t *dma
11521152
)
11531153
{

‎drivers/usb/gadget/dummy_hcd.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static int dummy_disable (struct usb_ep *_ep)
470470
}
471471

472472
static struct usb_request *
473-
dummy_alloc_request (struct usb_ep *_ep, unsigned mem_flags)
473+
dummy_alloc_request (struct usb_ep *_ep, gfp_t mem_flags)
474474
{
475475
struct dummy_ep *ep;
476476
struct dummy_request *req;
@@ -507,7 +507,7 @@ dummy_alloc_buffer (
507507
struct usb_ep *_ep,
508508
unsigned bytes,
509509
dma_addr_t *dma,
510-
unsigned mem_flags
510+
gfp_t mem_flags
511511
) {
512512
char *retval;
513513
struct dummy_ep *ep;
@@ -541,7 +541,7 @@ fifo_complete (struct usb_ep *ep, struct usb_request *req)
541541

542542
static int
543543
dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
544-
unsigned mem_flags)
544+
gfp_t mem_flags)
545545
{
546546
struct dummy_ep *ep;
547547
struct dummy_request *req;
@@ -999,7 +999,7 @@ static int dummy_urb_enqueue (
999999
struct usb_hcd *hcd,
10001000
struct usb_host_endpoint *ep,
10011001
struct urb *urb,
1002-
unsigned mem_flags
1002+
gfp_t mem_flags
10031003
) {
10041004
struct dummy *dum;
10051005
struct urbp *urbp;

‎drivers/usb/gadget/ether.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,11 @@ config_buf (enum usb_device_speed speed,
945945

946946
/*-------------------------------------------------------------------------*/
947947

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);
948+
static void eth_start (struct eth_dev *dev, gfp_t gfp_flags);
949+
static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags);
950950

951951
static int
952-
set_ether_config (struct eth_dev *dev, unsigned gfp_flags)
952+
set_ether_config (struct eth_dev *dev, gfp_t gfp_flags)
953953
{
954954
int result = 0;
955955
struct usb_gadget *gadget = dev->gadget;
@@ -1081,7 +1081,7 @@ static void eth_reset_config (struct eth_dev *dev)
10811081
* that returns config descriptors, and altsetting code.
10821082
*/
10831083
static int
1084-
eth_set_config (struct eth_dev *dev, unsigned number, unsigned gfp_flags)
1084+
eth_set_config (struct eth_dev *dev, unsigned number, gfp_t gfp_flags)
10851085
{
10861086
int result = 0;
10871087
struct usb_gadget *gadget = dev->gadget;
@@ -1598,7 +1598,7 @@ static void defer_kevent (struct eth_dev *dev, int flag)
15981598
static void rx_complete (struct usb_ep *ep, struct usb_request *req);
15991599

16001600
static int
1601-
rx_submit (struct eth_dev *dev, struct usb_request *req, unsigned gfp_flags)
1601+
rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
16021602
{
16031603
struct sk_buff *skb;
16041604
int retval = -ENOMEM;
@@ -1724,7 +1724,7 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
17241724
}
17251725

17261726
static int prealloc (struct list_head *list, struct usb_ep *ep,
1727-
unsigned n, unsigned gfp_flags)
1727+
unsigned n, gfp_t gfp_flags)
17281728
{
17291729
unsigned i;
17301730
struct usb_request *req;
@@ -1763,7 +1763,7 @@ static int prealloc (struct list_head *list, struct usb_ep *ep,
17631763
return 0;
17641764
}
17651765

1766-
static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags)
1766+
static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags)
17671767
{
17681768
int status;
17691769

@@ -1779,7 +1779,7 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags)
17791779
return status;
17801780
}
17811781

1782-
static void rx_fill (struct eth_dev *dev, unsigned gfp_flags)
1782+
static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags)
17831783
{
17841784
struct usb_request *req;
17851785
unsigned long flags;
@@ -1962,7 +1962,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
19621962
* normally just one notification will be queued.
19631963
*/
19641964

1965-
static struct usb_request *eth_req_alloc (struct usb_ep *, unsigned, unsigned);
1965+
static struct usb_request *eth_req_alloc (struct usb_ep *, unsigned, gfp_t);
19661966
static void eth_req_free (struct usb_ep *ep, struct usb_request *req);
19671967

19681968
static void
@@ -2024,7 +2024,7 @@ static int rndis_control_ack (struct net_device *net)
20242024

20252025
#endif /* RNDIS */
20262026

2027-
static void eth_start (struct eth_dev *dev, unsigned gfp_flags)
2027+
static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
20282028
{
20292029
DEBUG (dev, "%s\n", __FUNCTION__);
20302030

@@ -2092,7 +2092,7 @@ static int eth_stop (struct net_device *net)
20922092
/*-------------------------------------------------------------------------*/
20932093

20942094
static struct usb_request *
2095-
eth_req_alloc (struct usb_ep *ep, unsigned size, unsigned gfp_flags)
2095+
eth_req_alloc (struct usb_ep *ep, unsigned size, gfp_t gfp_flags)
20962096
{
20972097
struct usb_request *req;
20982098

‎drivers/usb/gadget/goku_udc.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int goku_ep_disable(struct usb_ep *_ep)
269269
/*-------------------------------------------------------------------------*/
270270

271271
static struct usb_request *
272-
goku_alloc_request(struct usb_ep *_ep, unsigned gfp_flags)
272+
goku_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags)
273273
{
274274
struct goku_request *req;
275275

@@ -327,7 +327,7 @@ goku_free_request(struct usb_ep *_ep, struct usb_request *_req)
327327
*/
328328
static void *
329329
goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
330-
dma_addr_t *dma, unsigned gfp_flags)
330+
dma_addr_t *dma, gfp_t gfp_flags)
331331
{
332332
void *retval;
333333
struct goku_ep *ep;
@@ -789,7 +789,7 @@ static void abort_dma(struct goku_ep *ep, int status)
789789
/*-------------------------------------------------------------------------*/
790790

791791
static int
792-
goku_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags)
792+
goku_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
793793
{
794794
struct goku_request *req;
795795
struct goku_ep *ep;

‎drivers/usb/gadget/lh7a40x_udc.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ static char *state_names[] = {
7171
static int lh7a40x_ep_enable(struct usb_ep *ep,
7272
const struct usb_endpoint_descriptor *);
7373
static int lh7a40x_ep_disable(struct usb_ep *ep);
74-
static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, int);
74+
static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, gfp_t);
7575
static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *);
7676
static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned, dma_addr_t *,
77-
int);
77+
gfp_t);
7878
static void lh7a40x_free_buffer(struct usb_ep *ep, void *, dma_addr_t,
7979
unsigned);
80-
static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, int);
80+
static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, gfp_t);
8181
static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *);
8282
static int lh7a40x_set_halt(struct usb_ep *ep, int);
8383
static int lh7a40x_fifo_status(struct usb_ep *ep);
@@ -1106,7 +1106,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
11061106
}
11071107

11081108
static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
1109-
unsigned gfp_flags)
1109+
gfp_t gfp_flags)
11101110
{
11111111
struct lh7a40x_request *req;
11121112

@@ -1134,7 +1134,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req)
11341134
}
11351135

11361136
static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes,
1137-
dma_addr_t * dma, unsigned gfp_flags)
1137+
dma_addr_t * dma, gfp_t gfp_flags)
11381138
{
11391139
char *retval;
11401140

@@ -1158,7 +1158,7 @@ static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma,
11581158
* NOTE: Sets INDEX register
11591159
*/
11601160
static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
1161-
unsigned gfp_flags)
1161+
gfp_t gfp_flags)
11621162
{
11631163
struct lh7a40x_request *req;
11641164
struct lh7a40x_ep *ep;

0 commit comments

Comments
 (0)