Commit 55016f10 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] gfp_t: drivers/usb

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 970a9e73
...@@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd) ...@@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd)
void *hcd_buffer_alloc ( void *hcd_buffer_alloc (
struct usb_bus *bus, struct usb_bus *bus,
size_t size, size_t size,
unsigned mem_flags, gfp_t mem_flags,
dma_addr_t *dma dma_addr_t *dma
) )
{ {
......
...@@ -1112,7 +1112,7 @@ static void urb_unlink (struct urb *urb) ...@@ -1112,7 +1112,7 @@ static void urb_unlink (struct urb *urb)
* expects usb_submit_urb() to have sanity checked and conditioned all * expects usb_submit_urb() to have sanity checked and conditioned all
* inputs in the urb * inputs in the urb
*/ */
static int hcd_submit_urb (struct urb *urb, unsigned mem_flags) static int hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
{ {
int status; int status;
struct usb_hcd *hcd = urb->dev->bus->hcpriv; struct usb_hcd *hcd = urb->dev->bus->hcpriv;
......
...@@ -142,12 +142,12 @@ struct hcd_timeout { /* timeouts we allocate */ ...@@ -142,12 +142,12 @@ struct hcd_timeout { /* timeouts we allocate */
struct usb_operations { struct usb_operations {
int (*get_frame_number) (struct usb_device *usb_dev); int (*get_frame_number) (struct usb_device *usb_dev);
int (*submit_urb) (struct urb *urb, unsigned mem_flags); int (*submit_urb) (struct urb *urb, gfp_t mem_flags);
int (*unlink_urb) (struct urb *urb, int status); int (*unlink_urb) (struct urb *urb, int status);
/* allocate dma-consistent buffer for URB_DMA_NOMAPPING */ /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
void *(*buffer_alloc)(struct usb_bus *bus, size_t size, void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
unsigned mem_flags, gfp_t mem_flags,
dma_addr_t *dma); dma_addr_t *dma);
void (*buffer_free)(struct usb_bus *bus, size_t size, void (*buffer_free)(struct usb_bus *bus, size_t size,
void *addr, dma_addr_t dma); void *addr, dma_addr_t dma);
...@@ -200,7 +200,7 @@ struct hc_driver { ...@@ -200,7 +200,7 @@ struct hc_driver {
int (*urb_enqueue) (struct usb_hcd *hcd, int (*urb_enqueue) (struct usb_hcd *hcd,
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
unsigned mem_flags); gfp_t mem_flags);
int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb); int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
/* hw synch, freeing endpoint resources that urb_dequeue can't */ /* hw synch, freeing endpoint resources that urb_dequeue can't */
...@@ -247,7 +247,7 @@ int hcd_buffer_create (struct usb_hcd *hcd); ...@@ -247,7 +247,7 @@ int hcd_buffer_create (struct usb_hcd *hcd);
void hcd_buffer_destroy (struct usb_hcd *hcd); void hcd_buffer_destroy (struct usb_hcd *hcd);
void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, void *hcd_buffer_alloc (struct usb_bus *bus, size_t size,
unsigned mem_flags, dma_addr_t *dma); gfp_t mem_flags, dma_addr_t *dma);
void hcd_buffer_free (struct usb_bus *bus, size_t size, void hcd_buffer_free (struct usb_bus *bus, size_t size,
void *addr, dma_addr_t dma); void *addr, dma_addr_t dma);
......
...@@ -321,7 +321,7 @@ int usb_sg_init ( ...@@ -321,7 +321,7 @@ int usb_sg_init (
struct scatterlist *sg, struct scatterlist *sg,
int nents, int nents,
size_t length, size_t length,
unsigned mem_flags gfp_t mem_flags
) )
{ {
int i; int i;
......
...@@ -60,7 +60,7 @@ void usb_init_urb(struct urb *urb) ...@@ -60,7 +60,7 @@ void usb_init_urb(struct urb *urb)
* *
* The driver must call usb_free_urb() when it is finished with the urb. * The driver must call usb_free_urb() when it is finished with the urb.
*/ */
struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags) struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags)
{ {
struct urb *urb; struct urb *urb;
...@@ -224,7 +224,7 @@ struct urb * usb_get_urb(struct urb *urb) ...@@ -224,7 +224,7 @@ struct urb * usb_get_urb(struct urb *urb)
* GFP_NOIO, unless b) or c) apply * GFP_NOIO, unless b) or c) apply
* *
*/ */
int usb_submit_urb(struct urb *urb, unsigned mem_flags) int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
{ {
int pipe, temp, max; int pipe, temp, max;
struct usb_device *dev; struct usb_device *dev;
......
...@@ -1147,7 +1147,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size, ...@@ -1147,7 +1147,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
void *usb_buffer_alloc ( void *usb_buffer_alloc (
struct usb_device *dev, struct usb_device *dev,
size_t size, size_t size,
unsigned mem_flags, gfp_t mem_flags,
dma_addr_t *dma dma_addr_t *dma
) )
{ {
......
...@@ -470,7 +470,7 @@ static int dummy_disable (struct usb_ep *_ep) ...@@ -470,7 +470,7 @@ static int dummy_disable (struct usb_ep *_ep)
} }
static struct usb_request * static struct usb_request *
dummy_alloc_request (struct usb_ep *_ep, unsigned mem_flags) dummy_alloc_request (struct usb_ep *_ep, gfp_t mem_flags)
{ {
struct dummy_ep *ep; struct dummy_ep *ep;
struct dummy_request *req; struct dummy_request *req;
...@@ -507,7 +507,7 @@ dummy_alloc_buffer ( ...@@ -507,7 +507,7 @@ dummy_alloc_buffer (
struct usb_ep *_ep, struct usb_ep *_ep,
unsigned bytes, unsigned bytes,
dma_addr_t *dma, dma_addr_t *dma,
unsigned mem_flags gfp_t mem_flags
) { ) {
char *retval; char *retval;
struct dummy_ep *ep; struct dummy_ep *ep;
...@@ -541,7 +541,7 @@ fifo_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -541,7 +541,7 @@ fifo_complete (struct usb_ep *ep, struct usb_request *req)
static int static int
dummy_queue (struct usb_ep *_ep, struct usb_request *_req, dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
unsigned mem_flags) gfp_t mem_flags)
{ {
struct dummy_ep *ep; struct dummy_ep *ep;
struct dummy_request *req; struct dummy_request *req;
...@@ -999,7 +999,7 @@ static int dummy_urb_enqueue ( ...@@ -999,7 +999,7 @@ static int dummy_urb_enqueue (
struct usb_hcd *hcd, struct usb_hcd *hcd,
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) { ) {
struct dummy *dum; struct dummy *dum;
struct urbp *urbp; struct urbp *urbp;
......
...@@ -945,11 +945,11 @@ config_buf (enum usb_device_speed speed, ...@@ -945,11 +945,11 @@ config_buf (enum usb_device_speed speed,
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static void eth_start (struct eth_dev *dev, unsigned gfp_flags); static void eth_start (struct eth_dev *dev, gfp_t gfp_flags);
static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags); static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags);
static int static int
set_ether_config (struct eth_dev *dev, unsigned gfp_flags) set_ether_config (struct eth_dev *dev, gfp_t gfp_flags)
{ {
int result = 0; int result = 0;
struct usb_gadget *gadget = dev->gadget; struct usb_gadget *gadget = dev->gadget;
...@@ -1081,7 +1081,7 @@ static void eth_reset_config (struct eth_dev *dev) ...@@ -1081,7 +1081,7 @@ static void eth_reset_config (struct eth_dev *dev)
* that returns config descriptors, and altsetting code. * that returns config descriptors, and altsetting code.
*/ */
static int static int
eth_set_config (struct eth_dev *dev, unsigned number, unsigned gfp_flags) eth_set_config (struct eth_dev *dev, unsigned number, gfp_t gfp_flags)
{ {
int result = 0; int result = 0;
struct usb_gadget *gadget = dev->gadget; struct usb_gadget *gadget = dev->gadget;
...@@ -1598,7 +1598,7 @@ static void defer_kevent (struct eth_dev *dev, int flag) ...@@ -1598,7 +1598,7 @@ static void defer_kevent (struct eth_dev *dev, int flag)
static void rx_complete (struct usb_ep *ep, struct usb_request *req); static void rx_complete (struct usb_ep *ep, struct usb_request *req);
static int static int
rx_submit (struct eth_dev *dev, struct usb_request *req, unsigned gfp_flags) rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
{ {
struct sk_buff *skb; struct sk_buff *skb;
int retval = -ENOMEM; int retval = -ENOMEM;
...@@ -1724,7 +1724,7 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -1724,7 +1724,7 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
} }
static int prealloc (struct list_head *list, struct usb_ep *ep, static int prealloc (struct list_head *list, struct usb_ep *ep,
unsigned n, unsigned gfp_flags) unsigned n, gfp_t gfp_flags)
{ {
unsigned i; unsigned i;
struct usb_request *req; struct usb_request *req;
...@@ -1763,7 +1763,7 @@ static int prealloc (struct list_head *list, struct usb_ep *ep, ...@@ -1763,7 +1763,7 @@ static int prealloc (struct list_head *list, struct usb_ep *ep,
return 0; return 0;
} }
static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags) static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags)
{ {
int status; int status;
...@@ -1779,7 +1779,7 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags) ...@@ -1779,7 +1779,7 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags)
return status; return status;
} }
static void rx_fill (struct eth_dev *dev, unsigned gfp_flags) static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags)
{ {
struct usb_request *req; struct usb_request *req;
unsigned long flags; unsigned long flags;
...@@ -1962,7 +1962,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) ...@@ -1962,7 +1962,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
* normally just one notification will be queued. * normally just one notification will be queued.
*/ */
static struct usb_request *eth_req_alloc (struct usb_ep *, unsigned, unsigned); static struct usb_request *eth_req_alloc (struct usb_ep *, unsigned, gfp_t);
static void eth_req_free (struct usb_ep *ep, struct usb_request *req); static void eth_req_free (struct usb_ep *ep, struct usb_request *req);
static void static void
...@@ -2024,7 +2024,7 @@ static int rndis_control_ack (struct net_device *net) ...@@ -2024,7 +2024,7 @@ static int rndis_control_ack (struct net_device *net)
#endif /* RNDIS */ #endif /* RNDIS */
static void eth_start (struct eth_dev *dev, unsigned gfp_flags) static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
{ {
DEBUG (dev, "%s\n", __FUNCTION__); DEBUG (dev, "%s\n", __FUNCTION__);
...@@ -2092,7 +2092,7 @@ static int eth_stop (struct net_device *net) ...@@ -2092,7 +2092,7 @@ static int eth_stop (struct net_device *net)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static struct usb_request * static struct usb_request *
eth_req_alloc (struct usb_ep *ep, unsigned size, unsigned gfp_flags) eth_req_alloc (struct usb_ep *ep, unsigned size, gfp_t gfp_flags)
{ {
struct usb_request *req; struct usb_request *req;
......
...@@ -269,7 +269,7 @@ static int goku_ep_disable(struct usb_ep *_ep) ...@@ -269,7 +269,7 @@ static int goku_ep_disable(struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static struct usb_request * static struct usb_request *
goku_alloc_request(struct usb_ep *_ep, unsigned gfp_flags) goku_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags)
{ {
struct goku_request *req; struct goku_request *req;
...@@ -327,7 +327,7 @@ goku_free_request(struct usb_ep *_ep, struct usb_request *_req) ...@@ -327,7 +327,7 @@ goku_free_request(struct usb_ep *_ep, struct usb_request *_req)
*/ */
static void * static void *
goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes, goku_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
dma_addr_t *dma, unsigned gfp_flags) dma_addr_t *dma, gfp_t gfp_flags)
{ {
void *retval; void *retval;
struct goku_ep *ep; struct goku_ep *ep;
...@@ -789,7 +789,7 @@ static void abort_dma(struct goku_ep *ep, int status) ...@@ -789,7 +789,7 @@ static void abort_dma(struct goku_ep *ep, int status)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int static int
goku_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) goku_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
{ {
struct goku_request *req; struct goku_request *req;
struct goku_ep *ep; struct goku_ep *ep;
......
...@@ -71,13 +71,13 @@ static char *state_names[] = { ...@@ -71,13 +71,13 @@ static char *state_names[] = {
static int lh7a40x_ep_enable(struct usb_ep *ep, static int lh7a40x_ep_enable(struct usb_ep *ep,
const struct usb_endpoint_descriptor *); const struct usb_endpoint_descriptor *);
static int lh7a40x_ep_disable(struct usb_ep *ep); static int lh7a40x_ep_disable(struct usb_ep *ep);
static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, int); static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, gfp_t);
static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *); static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *);
static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned, dma_addr_t *, static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned, dma_addr_t *,
int); gfp_t);
static void lh7a40x_free_buffer(struct usb_ep *ep, void *, dma_addr_t, static void lh7a40x_free_buffer(struct usb_ep *ep, void *, dma_addr_t,
unsigned); unsigned);
static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, int); static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, gfp_t);
static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *); static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *);
static int lh7a40x_set_halt(struct usb_ep *ep, int); static int lh7a40x_set_halt(struct usb_ep *ep, int);
static int lh7a40x_fifo_status(struct usb_ep *ep); static int lh7a40x_fifo_status(struct usb_ep *ep);
...@@ -1106,7 +1106,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep) ...@@ -1106,7 +1106,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
} }
static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
unsigned gfp_flags) gfp_t gfp_flags)
{ {
struct lh7a40x_request *req; struct lh7a40x_request *req;
...@@ -1134,7 +1134,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req) ...@@ -1134,7 +1134,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req)
} }
static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes, static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes,
dma_addr_t * dma, unsigned gfp_flags) dma_addr_t * dma, gfp_t gfp_flags)
{ {
char *retval; char *retval;
...@@ -1158,7 +1158,7 @@ static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma, ...@@ -1158,7 +1158,7 @@ static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma,
* NOTE: Sets INDEX register * NOTE: Sets INDEX register
*/ */
static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req, static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
unsigned gfp_flags) gfp_t gfp_flags)
{ {
struct lh7a40x_request *req; struct lh7a40x_request *req;
struct lh7a40x_ep *ep; struct lh7a40x_ep *ep;
......
...@@ -376,7 +376,7 @@ static int net2280_disable (struct usb_ep *_ep) ...@@ -376,7 +376,7 @@ static int net2280_disable (struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static struct usb_request * static struct usb_request *
net2280_alloc_request (struct usb_ep *_ep, unsigned gfp_flags) net2280_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
{ {
struct net2280_ep *ep; struct net2280_ep *ep;
struct net2280_request *req; struct net2280_request *req;
...@@ -463,7 +463,7 @@ net2280_alloc_buffer ( ...@@ -463,7 +463,7 @@ net2280_alloc_buffer (
struct usb_ep *_ep, struct usb_ep *_ep,
unsigned bytes, unsigned bytes,
dma_addr_t *dma, dma_addr_t *dma,
unsigned gfp_flags gfp_t gfp_flags
) )
{ {
void *retval; void *retval;
...@@ -897,7 +897,7 @@ done (struct net2280_ep *ep, struct net2280_request *req, int status) ...@@ -897,7 +897,7 @@ done (struct net2280_ep *ep, struct net2280_request *req, int status)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int static int
net2280_queue (struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) net2280_queue (struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
{ {
struct net2280_request *req; struct net2280_request *req;
struct net2280_ep *ep; struct net2280_ep *ep;
......
...@@ -269,7 +269,7 @@ static int omap_ep_disable(struct usb_ep *_ep) ...@@ -269,7 +269,7 @@ static int omap_ep_disable(struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static struct usb_request * static struct usb_request *
omap_alloc_request(struct usb_ep *ep, unsigned gfp_flags) omap_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
{ {
struct omap_req *req; struct omap_req *req;
...@@ -298,7 +298,7 @@ omap_alloc_buffer( ...@@ -298,7 +298,7 @@ omap_alloc_buffer(
struct usb_ep *_ep, struct usb_ep *_ep,
unsigned bytes, unsigned bytes,
dma_addr_t *dma, dma_addr_t *dma,
unsigned gfp_flags gfp_t gfp_flags
) )
{ {
void *retval; void *retval;
...@@ -937,7 +937,7 @@ static void dma_channel_release(struct omap_ep *ep) ...@@ -937,7 +937,7 @@ static void dma_channel_release(struct omap_ep *ep)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int static int
omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
{ {
struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); struct omap_ep *ep = container_of(_ep, struct omap_ep, ep);
struct omap_req *req = container_of(_req, struct omap_req, req); struct omap_req *req = container_of(_req, struct omap_req, req);
......
...@@ -332,7 +332,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep) ...@@ -332,7 +332,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
* pxa2xx_ep_alloc_request - allocate a request data structure * pxa2xx_ep_alloc_request - allocate a request data structure
*/ */
static struct usb_request * static struct usb_request *
pxa2xx_ep_alloc_request (struct usb_ep *_ep, unsigned gfp_flags) pxa2xx_ep_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
{ {
struct pxa2xx_request *req; struct pxa2xx_request *req;
...@@ -367,7 +367,7 @@ pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req) ...@@ -367,7 +367,7 @@ pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
*/ */
static void * static void *
pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
dma_addr_t *dma, unsigned gfp_flags) dma_addr_t *dma, gfp_t gfp_flags)
{ {
char *retval; char *retval;
...@@ -874,7 +874,7 @@ static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r) ...@@ -874,7 +874,7 @@ static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int static int
pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags) pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
{ {
struct pxa2xx_request *req; struct pxa2xx_request *req;
struct pxa2xx_ep *ep; struct pxa2xx_ep *ep;
......
...@@ -300,18 +300,18 @@ static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed, ...@@ -300,18 +300,18 @@ static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed,
u8 type, unsigned int index, int is_otg); u8 type, unsigned int index, int is_otg);
static struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned int len, static struct usb_request *gs_alloc_req(struct usb_ep *ep, unsigned int len,
unsigned kmalloc_flags); gfp_t kmalloc_flags);
static void gs_free_req(struct usb_ep *ep, struct usb_request *req); static void gs_free_req(struct usb_ep *ep, struct usb_request *req);
static struct gs_req_entry *gs_alloc_req_entry(struct usb_ep *ep, unsigned len, static struct gs_req_entry *gs_alloc_req_entry(struct usb_ep *ep, unsigned len,
unsigned kmalloc_flags); gfp_t kmalloc_flags);
static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req); static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req);
static int gs_alloc_ports(struct gs_dev *dev, unsigned kmalloc_flags); static int gs_alloc_ports(struct gs_dev *dev, gfp_t kmalloc_flags);
static void gs_free_ports(struct gs_dev *dev); static void gs_free_ports(struct gs_dev *dev);
/* circular buffer */ /* circular buffer */
static struct gs_buf *gs_buf_alloc(unsigned int size, unsigned kmalloc_flags); static struct gs_buf *gs_buf_alloc(unsigned int size, gfp_t kmalloc_flags);
static void gs_buf_free(struct gs_buf *gb); static void gs_buf_free(struct gs_buf *gb);
static void gs_buf_clear(struct gs_buf *gb); static void gs_buf_clear(struct gs_buf *gb);
static unsigned int gs_buf_data_avail(struct gs_buf *gb); static unsigned int gs_buf_data_avail(struct gs_buf *gb);
...@@ -2091,7 +2091,7 @@ static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed, ...@@ -2091,7 +2091,7 @@ static int gs_build_config_buf(u8 *buf, enum usb_device_speed speed,
* usb_request or NULL if there is an error. * usb_request or NULL if there is an error.
*/ */
static struct usb_request * static struct usb_request *
gs_alloc_req(struct usb_ep *ep, unsigned int len, unsigned kmalloc_flags) gs_alloc_req(struct usb_ep *ep, unsigned int len, gfp_t kmalloc_flags)
{ {
struct usb_request *req; struct usb_request *req;
...@@ -2132,7 +2132,7 @@ static void gs_free_req(struct usb_ep *ep, struct usb_request *req) ...@@ -2132,7 +2132,7 @@ static void gs_free_req(struct usb_ep *ep, struct usb_request *req)
* endpoint, buffer len, and kmalloc flags. * endpoint, buffer len, and kmalloc flags.
*/ */
static struct gs_req_entry * static struct gs_req_entry *
gs_alloc_req_entry(struct usb_ep *ep, unsigned len, unsigned kmalloc_flags) gs_alloc_req_entry(struct usb_ep *ep, unsigned len, gfp_t kmalloc_flags)
{ {
struct gs_req_entry *req; struct gs_req_entry *req;
...@@ -2173,7 +2173,7 @@ static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req) ...@@ -2173,7 +2173,7 @@ static void gs_free_req_entry(struct usb_ep *ep, struct gs_req_entry *req)
* *
* The device lock is normally held when calling this function. * The device lock is normally held when calling this function.
*/ */
static int gs_alloc_ports(struct gs_dev *dev, unsigned kmalloc_flags) static int gs_alloc_ports(struct gs_dev *dev, gfp_t kmalloc_flags)
{ {
int i; int i;
struct gs_port *port; struct gs_port *port;
...@@ -2255,7 +2255,7 @@ static void gs_free_ports(struct gs_dev *dev) ...@@ -2255,7 +2255,7 @@ static void gs_free_ports(struct gs_dev *dev)
* *
* Allocate a circular buffer and all associated memory. * Allocate a circular buffer and all associated memory.
*/ */
static struct gs_buf *gs_buf_alloc(unsigned int size, unsigned kmalloc_flags) static struct gs_buf *gs_buf_alloc(unsigned int size, gfp_t kmalloc_flags)
{ {
struct gs_buf *gb; struct gs_buf *gb;
......
...@@ -612,7 +612,7 @@ static void source_sink_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -612,7 +612,7 @@ static void source_sink_complete (struct usb_ep *ep, struct usb_request *req)
} }
static struct usb_request * static struct usb_request *
source_sink_start_ep (struct usb_ep *ep, unsigned gfp_flags) source_sink_start_ep (struct usb_ep *ep, gfp_t gfp_flags)
{ {
struct usb_request *req; struct usb_request *req;
int status; int status;
...@@ -640,7 +640,7 @@ source_sink_start_ep (struct usb_ep *ep, unsigned gfp_flags) ...@@ -640,7 +640,7 @@ source_sink_start_ep (struct usb_ep *ep, unsigned gfp_flags)
} }
static int static int
set_source_sink_config (struct zero_dev *dev, unsigned gfp_flags) set_source_sink_config (struct zero_dev *dev, gfp_t gfp_flags)
{ {
int result = 0; int result = 0;
struct usb_ep *ep; struct usb_ep *ep;
...@@ -744,7 +744,7 @@ static void loopback_complete (struct usb_ep *ep, struct usb_request *req) ...@@ -744,7 +744,7 @@ static void loopback_complete (struct usb_ep *ep, struct usb_request *req)
} }
static int static int
set_loopback_config (struct zero_dev *dev, unsigned gfp_flags) set_loopback_config (struct zero_dev *dev, gfp_t gfp_flags)
{ {
int result = 0; int result = 0;
struct usb_ep *ep; struct usb_ep *ep;
...@@ -845,7 +845,7 @@ static void zero_reset_config (struct zero_dev *dev) ...@@ -845,7 +845,7 @@ static void zero_reset_config (struct zero_dev *dev)
* by limiting configuration choices (like the pxa2xx). * by limiting configuration choices (like the pxa2xx).
*/ */
static int static int
zero_set_config (struct zero_dev *dev, unsigned number, unsigned gfp_flags) zero_set_config (struct zero_dev *dev, unsigned number, gfp_t gfp_flags)
{ {
int result = 0; int result = 0;
struct usb_gadget *gadget = dev->gadget; struct usb_gadget *gadget = dev->gadget;
......
...@@ -983,7 +983,7 @@ static int ehci_urb_enqueue ( ...@@ -983,7 +983,7 @@ static int ehci_urb_enqueue (
struct usb_hcd *hcd, struct usb_hcd *hcd,
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) { ) {
struct ehci_hcd *ehci = hcd_to_ehci (hcd); struct ehci_hcd *ehci = hcd_to_ehci (hcd);
struct list_head qtd_list; struct list_head qtd_list;
......
...@@ -45,7 +45,7 @@ static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma) ...@@ -45,7 +45,7 @@ static inline void ehci_qtd_init (struct ehci_qtd *qtd, dma_addr_t dma)
INIT_LIST_HEAD (&qtd->qtd_list); INIT_LIST_HEAD (&qtd->qtd_list);
} }
static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, int flags) static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags)
{ {
struct ehci_qtd *qtd; struct ehci_qtd *qtd;
dma_addr_t dma; dma_addr_t dma;
...@@ -79,7 +79,7 @@ static void qh_destroy (struct kref *kref) ...@@ -79,7 +79,7 @@ static void qh_destroy (struct kref *kref)
dma_pool_free (ehci->qh_pool, qh, qh->qh_dma); dma_pool_free (ehci->qh_pool, qh, qh->qh_dma);
} }
static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, int flags) static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, gfp_t flags)
{ {
struct ehci_qh *qh; struct ehci_qh *qh;
dma_addr_t dma; dma_addr_t dma;
...@@ -161,7 +161,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci) ...@@ -161,7 +161,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci)
} }
/* remember to add cleanup code (above) if you add anything here */ /* remember to add cleanup code (above) if you add anything here */
static int ehci_mem_init (struct ehci_hcd *ehci, int flags) static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
{ {
int i; int i;
......
...@@ -477,7 +477,7 @@ qh_urb_transaction ( ...@@ -477,7 +477,7 @@ qh_urb_transaction (
struct ehci_hcd *ehci, struct ehci_hcd *ehci,
struct urb *urb, struct urb *urb,
struct list_head *head, struct list_head *head,
int flags gfp_t flags
) { ) {
struct ehci_qtd *qtd, *qtd_prev; struct ehci_qtd *qtd, *qtd_prev;
dma_addr_t buf; dma_addr_t buf;
...@@ -629,7 +629,7 @@ static struct ehci_qh * ...@@ -629,7 +629,7 @@ static struct ehci_qh *
qh_make ( qh_make (
struct ehci_hcd *ehci, struct ehci_hcd *ehci,
struct urb *urb, struct urb *urb,
int flags gfp_t flags
) { ) {
struct ehci_qh *qh = ehci_qh_alloc (ehci, flags); struct ehci_qh *qh = ehci_qh_alloc (ehci, flags);
u32 info1 = 0, info2 = 0; u32 info1 = 0, info2 = 0;
...@@ -906,7 +906,7 @@ submit_async ( ...@@ -906,7 +906,7 @@ submit_async (
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
struct list_head *qtd_list, struct list_head *qtd_list,
unsigned mem_flags gfp_t mem_flags
) { ) {
struct ehci_qtd *qtd; struct ehci_qtd *qtd;
int epnum; int epnum;
......
...@@ -589,7 +589,7 @@ static int intr_submit ( ...@@ -589,7 +589,7 @@ static int intr_submit (
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
struct list_head *qtd_list, struct list_head *qtd_list,
unsigned mem_flags gfp_t mem_flags
) { ) {
unsigned epnum; unsigned epnum;
unsigned long flags; unsigned long flags;
...@@ -634,7 +634,7 @@ static int intr_submit ( ...@@ -634,7 +634,7 @@ static int intr_submit (
/* ehci_iso_stream ops work with both ITD and SITD */ /* ehci_iso_stream ops work with both ITD and SITD */
static struct ehci_iso_stream * static struct ehci_iso_stream *
iso_stream_alloc (unsigned mem_flags) iso_stream_alloc (gfp_t mem_flags)
{ {
struct ehci_iso_stream *stream; struct ehci_iso_stream *stream;
...@@ -851,7 +851,7 @@ iso_stream_find (struct ehci_hcd *ehci, struct urb *urb) ...@@ -851,7 +851,7 @@ iso_stream_find (struct ehci_hcd *ehci, struct urb *urb)
/* ehci_iso_sched ops can be ITD-only or SITD-only */ /* ehci_iso_sched ops can be ITD-only or SITD-only */
static struct ehci_iso_sched * static struct ehci_iso_sched *
iso_sched_alloc (unsigned packets, unsigned mem_flags) iso_sched_alloc (unsigned packets, gfp_t mem_flags)
{ {
struct ehci_iso_sched *iso_sched; struct ehci_iso_sched *iso_sched;
int size = sizeof *iso_sched; int size = sizeof *iso_sched;
...@@ -924,7 +924,7 @@ itd_urb_transaction ( ...@@ -924,7 +924,7 @@ itd_urb_transaction (
struct ehci_iso_stream *stream, struct ehci_iso_stream *stream,
struct ehci_hcd *ehci, struct ehci_hcd *ehci,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) )
{ {
struct ehci_itd *itd; struct ehci_itd *itd;
...@@ -1418,7 +1418,7 @@ itd_complete ( ...@@ -1418,7 +1418,7 @@ itd_complete (
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int itd_submit (struct ehci_hcd *ehci, struct urb *urb, static int itd_submit (struct ehci_hcd *ehci, struct urb *urb,
unsigned mem_flags) gfp_t mem_flags)
{ {
int status = -EINVAL; int status = -EINVAL;
unsigned long flags; unsigned long flags;
...@@ -1529,7 +1529,7 @@ sitd_urb_transaction ( ...@@ -1529,7 +1529,7 @@ sitd_urb_transaction (
struct ehci_iso_stream *stream, struct ehci_iso_stream *stream,
struct ehci_hcd *ehci, struct ehci_hcd *ehci,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) )
{ {
struct ehci_sitd *sitd; struct ehci_sitd *sitd;
...@@ -1779,7 +1779,7 @@ sitd_complete ( ...@@ -1779,7 +1779,7 @@ sitd_complete (
static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb,
unsigned mem_flags) gfp_t mem_flags)
{ {
int status = -EINVAL; int status = -EINVAL;
unsigned long flags; unsigned long flags;
......
...@@ -694,7 +694,7 @@ static int balance(struct isp116x *isp116x, u16 period, u16 load) ...@@ -694,7 +694,7 @@ static int balance(struct isp116x *isp116x, u16 period, u16 load)
static int isp116x_urb_enqueue(struct usb_hcd *hcd, static int isp116x_urb_enqueue(struct usb_hcd *hcd,
struct usb_host_endpoint *hep, struct urb *urb, struct usb_host_endpoint *hep, struct urb *urb,
unsigned mem_flags) gfp_t mem_flags)
{ {
struct isp116x *isp116x = hcd_to_isp116x(hcd); struct isp116x *isp116x = hcd_to_isp116x(hcd);
struct usb_device *udev = urb->dev; struct usb_device *udev = urb->dev;
......
...@@ -180,7 +180,7 @@ static int ohci_urb_enqueue ( ...@@ -180,7 +180,7 @@ static int ohci_urb_enqueue (
struct usb_hcd *hcd, struct usb_hcd *hcd,
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) { ) {
struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_hcd *ohci = hcd_to_ohci (hcd);
struct ed *ed; struct ed *ed;
......
...@@ -84,7 +84,7 @@ dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma) ...@@ -84,7 +84,7 @@ dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma)
/* TDs ... */ /* TDs ... */
static struct td * static struct td *
td_alloc (struct ohci_hcd *hc, unsigned mem_flags) td_alloc (struct ohci_hcd *hc, gfp_t mem_flags)
{ {
dma_addr_t dma; dma_addr_t dma;
struct td *td; struct td *td;
...@@ -118,7 +118,7 @@ td_free (struct ohci_hcd *hc, struct td *td) ...@@ -118,7 +118,7 @@ td_free (struct ohci_hcd *hc, struct td *td)
/* EDs ... */ /* EDs ... */
static struct ed * static struct ed *
ed_alloc (struct ohci_hcd *hc, unsigned mem_flags) ed_alloc (struct ohci_hcd *hc, gfp_t mem_flags)
{ {
dma_addr_t dma; dma_addr_t dma;
struct ed *ed; struct ed *ed;
......
...@@ -818,7 +818,7 @@ static int sl811h_urb_enqueue( ...@@ -818,7 +818,7 @@ static int sl811h_urb_enqueue(
struct usb_hcd *hcd, struct usb_hcd *hcd,
struct usb_host_endpoint *hep, struct usb_host_endpoint *hep,
struct urb *urb, struct urb *urb,
unsigned mem_flags gfp_t mem_flags
) { ) {
struct sl811 *sl811 = hcd_to_sl811(hcd); struct sl811 *sl811 = hcd_to_sl811(hcd);
struct usb_device *udev = urb->dev; struct usb_device *udev = urb->dev;
......
...@@ -1164,7 +1164,7 @@ static struct urb *uhci_find_urb_ep(struct uhci_hcd *uhci, struct urb *urb) ...@@ -1164,7 +1164,7 @@ static struct urb *uhci_find_urb_ep(struct uhci_hcd *uhci, struct urb *urb)
static int uhci_urb_enqueue(struct usb_hcd *hcd, static int uhci_urb_enqueue(struct usb_hcd *hcd,
struct usb_host_endpoint *ep, struct usb_host_endpoint *ep,
struct urb *urb, unsigned mem_flags) struct urb *urb, gfp_t mem_flags)
{ {
int ret; int ret;
struct uhci_hcd *uhci = hcd_to_uhci(hcd); struct uhci_hcd *uhci = hcd_to_uhci(hcd);
......
...@@ -137,7 +137,7 @@ static void async_complete(struct urb *urb, struct pt_regs *ptregs) ...@@ -137,7 +137,7 @@ static void async_complete(struct urb *urb, struct pt_regs *ptregs)
static struct uss720_async_request *submit_async_request(struct parport_uss720_private *priv, static struct uss720_async_request *submit_async_request(struct parport_uss720_private *priv,
__u8 request, __u8 requesttype, __u16 value, __u16 index, __u8 request, __u8 requesttype, __u16 value, __u16 index,
unsigned int mem_flags) gfp_t mem_flags)
{ {
struct usb_device *usbdev; struct usb_device *usbdev;
struct uss720_async_request *rq; struct uss720_async_request *rq;
...@@ -204,7 +204,7 @@ static unsigned int kill_all_async_requests_priv(struct parport_uss720_private * ...@@ -204,7 +204,7 @@ static unsigned int kill_all_async_requests_priv(struct parport_uss720_private *
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static int get_1284_register(struct parport *pp, unsigned char reg, unsigned char *val, unsigned int mem_flags) static int get_1284_register(struct parport *pp, unsigned char reg, unsigned char *val, gfp_t mem_flags)
{ {
struct parport_uss720_private *priv; struct parport_uss720_private *priv;
struct uss720_async_request *rq; struct uss720_async_request *rq;
...@@ -238,7 +238,7 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha ...@@ -238,7 +238,7 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
return -EIO; return -EIO;
} }
static int set_1284_register(struct parport *pp, unsigned char reg, unsigned char val, unsigned int mem_flags) static int set_1284_register(struct parport *pp, unsigned char reg, unsigned char val, gfp_t mem_flags)
{ {
struct parport_uss720_private *priv; struct parport_uss720_private *priv;
struct uss720_async_request *rq; struct uss720_async_request *rq;
......
...@@ -753,7 +753,7 @@ static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -753,7 +753,7 @@ static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} }
static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb, static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
unsigned flags) gfp_t flags)
{ {
int padlen; int padlen;
int headroom = skb_headroom(skb); int headroom = skb_headroom(skb);
......
...@@ -301,7 +301,7 @@ static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -301,7 +301,7 @@ static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} }
static struct sk_buff * static struct sk_buff *
genelink_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) genelink_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{ {
int padlen; int padlen;
int length = skb->len; int length = skb->len;
......
...@@ -477,13 +477,13 @@ static int kaweth_reset(struct kaweth_device *kaweth) ...@@ -477,13 +477,13 @@ static int kaweth_reset(struct kaweth_device *kaweth)
} }
static void kaweth_usb_receive(struct urb *, struct pt_regs *regs); static void kaweth_usb_receive(struct urb *, struct pt_regs *regs);
static int kaweth_resubmit_rx_urb(struct kaweth_device *, unsigned); static int kaweth_resubmit_rx_urb(struct kaweth_device *, gfp_t);
/**************************************************************** /****************************************************************
int_callback int_callback
*****************************************************************/ *****************************************************************/
static void kaweth_resubmit_int_urb(struct kaweth_device *kaweth, int mf) static void kaweth_resubmit_int_urb(struct kaweth_device *kaweth, gfp_t mf)
{ {
int status; int status;
...@@ -550,7 +550,7 @@ static void kaweth_resubmit_tl(void *d) ...@@ -550,7 +550,7 @@ static void kaweth_resubmit_tl(void *d)
* kaweth_resubmit_rx_urb * kaweth_resubmit_rx_urb
****************************************************************/ ****************************************************************/
static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth, static int kaweth_resubmit_rx_urb(struct kaweth_device *kaweth,
unsigned mem_flags) gfp_t mem_flags)
{ {
int result; int result;
......
...@@ -500,7 +500,7 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -500,7 +500,7 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} }
static struct sk_buff * static struct sk_buff *
net1080_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) net1080_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{ {
int padlen; int padlen;
struct sk_buff *skb2; struct sk_buff *skb2;
......
...@@ -517,7 +517,7 @@ static int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -517,7 +517,7 @@ static int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} }
static struct sk_buff * static struct sk_buff *
rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{ {
struct rndis_data_hdr *hdr; struct rndis_data_hdr *hdr;
struct sk_buff *skb2; struct sk_buff *skb2;
......
...@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent); ...@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent);
static void rx_complete (struct urb *urb, struct pt_regs *regs); static void rx_complete (struct urb *urb, struct pt_regs *regs);
static void rx_submit (struct usbnet *dev, struct urb *urb, unsigned flags) static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
{ {
struct sk_buff *skb; struct sk_buff *skb;
struct skb_data *entry; struct skb_data *entry;
......
...@@ -107,7 +107,7 @@ struct driver_info { ...@@ -107,7 +107,7 @@ struct driver_info {
/* fixup tx packet (add framing) */ /* fixup tx packet (add framing) */
struct sk_buff *(*tx_fixup)(struct usbnet *dev, struct sk_buff *(*tx_fixup)(struct usbnet *dev,
struct sk_buff *skb, unsigned flags); struct sk_buff *skb, gfp_t flags);
/* for new devices, use the descriptor-reading code instead */ /* for new devices, use the descriptor-reading code instead */
int in; /* rx endpoint */ int in; /* rx endpoint */
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
*/ */
static struct sk_buff * static struct sk_buff *
zaurus_tx_fixup(struct usbnet *dev, struct sk_buff *skb, unsigned flags) zaurus_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{ {
int padlen; int padlen;
struct sk_buff *skb2; struct sk_buff *skb2;
......
...@@ -521,7 +521,7 @@ static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int ...@@ -521,7 +521,7 @@ static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int
int reqlen; int reqlen;
char seq=0; char seq=0;
struct urb *urb; struct urb *urb;
unsigned int gfp_mask = wait ? GFP_NOIO : GFP_ATOMIC; gfp_t gfp_mask = wait ? GFP_NOIO : GFP_ATOMIC;
len += 4; /* first 4 are for header */ len += 4; /* first 4 are for header */
......
...@@ -933,17 +933,17 @@ static inline void usb_fill_int_urb (struct urb *urb, ...@@ -933,17 +933,17 @@ static inline void usb_fill_int_urb (struct urb *urb,
} }
extern void usb_init_urb(struct urb *urb); extern void usb_init_urb(struct urb *urb);
extern struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags); extern struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags);
extern void usb_free_urb(struct urb *urb); extern void usb_free_urb(struct urb *urb);
#define usb_put_urb usb_free_urb #define usb_put_urb usb_free_urb
extern struct urb *usb_get_urb(struct urb *urb); extern struct urb *usb_get_urb(struct urb *urb);
extern int usb_submit_urb(struct urb *urb, unsigned mem_flags); extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
extern int usb_unlink_urb(struct urb *urb); extern int usb_unlink_urb(struct urb *urb);
extern void usb_kill_urb(struct urb *urb); extern void usb_kill_urb(struct urb *urb);
#define HAVE_USB_BUFFERS #define HAVE_USB_BUFFERS
void *usb_buffer_alloc (struct usb_device *dev, size_t size, void *usb_buffer_alloc (struct usb_device *dev, size_t size,
unsigned mem_flags, dma_addr_t *dma); gfp_t mem_flags, dma_addr_t *dma);
void usb_buffer_free (struct usb_device *dev, size_t size, void usb_buffer_free (struct usb_device *dev, size_t size,
void *addr, dma_addr_t dma); void *addr, dma_addr_t dma);
...@@ -1050,7 +1050,7 @@ int usb_sg_init ( ...@@ -1050,7 +1050,7 @@ int usb_sg_init (
struct scatterlist *sg, struct scatterlist *sg,
int nents, int nents,
size_t length, size_t length,
unsigned mem_flags gfp_t mem_flags
); );
void usb_sg_cancel (struct usb_sg_request *io); void usb_sg_cancel (struct usb_sg_request *io);
void usb_sg_wait (struct usb_sg_request *io); void usb_sg_wait (struct usb_sg_request *io);
......
...@@ -107,18 +107,18 @@ struct usb_ep_ops { ...@@ -107,18 +107,18 @@ struct usb_ep_ops {
int (*disable) (struct usb_ep *ep); int (*disable) (struct usb_ep *ep);
struct usb_request *(*alloc_request) (struct usb_ep *ep, struct usb_request *(*alloc_request) (struct usb_ep *ep,
unsigned gfp_flags); gfp_t gfp_flags);
void (*free_request) (struct usb_ep *ep, struct usb_request *req); void (*free_request) (struct usb_ep *ep, struct usb_request *req);
void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes,
dma_addr_t *dma, unsigned gfp_flags); dma_addr_t *dma, gfp_t gfp_flags);
void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma,
unsigned bytes); unsigned bytes);
// NOTE: on 2.6, drivers may also use dma_map() and // NOTE: on 2.6, drivers may also use dma_map() and
// dma_sync_single_*() to directly manage dma overhead. // dma_sync_single_*() to directly manage dma overhead.
int (*queue) (struct usb_ep *ep, struct usb_request *req, int (*queue) (struct usb_ep *ep, struct usb_request *req,
unsigned gfp_flags); gfp_t gfp_flags);
int (*dequeue) (struct usb_ep *ep, struct usb_request *req); int (*dequeue) (struct usb_ep *ep, struct usb_request *req);
int (*set_halt) (struct usb_ep *ep, int value); int (*set_halt) (struct usb_ep *ep, int value);
...@@ -214,7 +214,7 @@ usb_ep_disable (struct usb_ep *ep) ...@@ -214,7 +214,7 @@ usb_ep_disable (struct usb_ep *ep)
* Returns the request, or null if one could not be allocated. * Returns the request, or null if one could not be allocated.
*/ */
static inline struct usb_request * static inline struct usb_request *
usb_ep_alloc_request (struct usb_ep *ep, unsigned gfp_flags) usb_ep_alloc_request (struct usb_ep *ep, gfp_t gfp_flags)
{ {
return ep->ops->alloc_request (ep, gfp_flags); return ep->ops->alloc_request (ep, gfp_flags);
} }
...@@ -254,7 +254,7 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) ...@@ -254,7 +254,7 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req)
*/ */
static inline void * static inline void *
usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma,
unsigned gfp_flags) gfp_t gfp_flags)
{ {
return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); return ep->ops->alloc_buffer (ep, len, dma, gfp_flags);
} }
...@@ -330,7 +330,7 @@ usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) ...@@ -330,7 +330,7 @@ usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len)
* reported when the usb peripheral is disconnected. * reported when the usb peripheral is disconnected.
*/ */
static inline int static inline int
usb_ep_queue (struct usb_ep *ep, struct usb_request *req, unsigned gfp_flags) usb_ep_queue (struct usb_ep *ep, struct usb_request *req, gfp_t gfp_flags)
{ {
return ep->ops->queue (ep, req, gfp_flags); return ep->ops->queue (ep, req, gfp_flags);
} }
......
...@@ -163,7 +163,7 @@ static const uint8_t snd_usbmidi_cin_length[] = { ...@@ -163,7 +163,7 @@ static const uint8_t snd_usbmidi_cin_length[] = {
/* /*
* Submits the URB, with error handling. * Submits the URB, with error handling.
*/ */
static int snd_usbmidi_submit_urb(struct urb* urb, int flags) static int snd_usbmidi_submit_urb(struct urb* urb, gfp_t flags)
{ {
int err = usb_submit_urb(urb, flags); int err = usb_submit_urb(urb, flags);
if (err < 0 && err != -ENODEV) if (err < 0 && err != -ENODEV)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment