Skip to content

Commit

Permalink
[PATCH] gfp_t: drivers/usb
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 28, 2005
1 parent 970a9e7 commit 55016f1
Show file tree
Hide file tree
Showing 37 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/core/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd)
void *hcd_buffer_alloc (
struct usb_bus *bus,
size_t size,
unsigned mem_flags,
gfp_t mem_flags,
dma_addr_t *dma
)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ static void urb_unlink (struct urb *urb)
* expects usb_submit_urb() to have sanity checked and conditioned all
* 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;
struct usb_hcd *hcd = urb->dev->bus->hcpriv;
Expand Down
8 changes: 4 additions & 4 deletions drivers/usb/core/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ struct hcd_timeout { /* timeouts we allocate */

struct usb_operations {
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);

/* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
unsigned mem_flags,
gfp_t mem_flags,
dma_addr_t *dma);
void (*buffer_free)(struct usb_bus *bus, size_t size,
void *addr, dma_addr_t dma);
Expand Down Expand Up @@ -200,7 +200,7 @@ struct hc_driver {
int (*urb_enqueue) (struct usb_hcd *hcd,
struct usb_host_endpoint *ep,
struct urb *urb,
unsigned mem_flags);
gfp_t mem_flags);
int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);

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

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 *addr, dma_addr_t dma);

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ int usb_sg_init (
struct scatterlist *sg,
int nents,
size_t length,
unsigned mem_flags
gfp_t mem_flags
)
{
int i;
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
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;

Expand Down Expand Up @@ -224,7 +224,7 @@ struct urb * usb_get_urb(struct urb *urb)
* 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;
struct usb_device *dev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
void *usb_buffer_alloc (
struct usb_device *dev,
size_t size,
unsigned mem_flags,
gfp_t mem_flags,
dma_addr_t *dma
)
{
Expand Down
8 changes: 4 additions & 4 deletions drivers/usb/gadget/dummy_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ static int dummy_disable (struct usb_ep *_ep)
}

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_request *req;
Expand Down Expand Up @@ -507,7 +507,7 @@ dummy_alloc_buffer (
struct usb_ep *_ep,
unsigned bytes,
dma_addr_t *dma,
unsigned mem_flags
gfp_t mem_flags
) {
char *retval;
struct dummy_ep *ep;
Expand Down Expand Up @@ -541,7 +541,7 @@ fifo_complete (struct usb_ep *ep, struct usb_request *req)

static int
dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
unsigned mem_flags)
gfp_t mem_flags)
{
struct dummy_ep *ep;
struct dummy_request *req;
Expand Down Expand Up @@ -999,7 +999,7 @@ static int dummy_urb_enqueue (
struct usb_hcd *hcd,
struct usb_host_endpoint *ep,
struct urb *urb,
unsigned mem_flags
gfp_t mem_flags
) {
struct dummy *dum;
struct urbp *urbp;
Expand Down
22 changes: 11 additions & 11 deletions drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,11 +945,11 @@ config_buf (enum usb_device_speed speed,

/*-------------------------------------------------------------------------*/

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

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;
struct usb_gadget *gadget = dev->gadget;
Expand Down Expand Up @@ -1081,7 +1081,7 @@ static void eth_reset_config (struct eth_dev *dev)
* that returns config descriptors, and altsetting code.
*/
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;
struct usb_gadget *gadget = dev->gadget;
Expand Down Expand Up @@ -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 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;
int retval = -ENOMEM;
Expand Down Expand Up @@ -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,
unsigned n, unsigned gfp_flags)
unsigned n, gfp_t gfp_flags)
{
unsigned i;
struct usb_request *req;
Expand Down Expand Up @@ -1763,7 +1763,7 @@ static int prealloc (struct list_head *list, struct usb_ep *ep,
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;

Expand All @@ -1779,7 +1779,7 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, unsigned gfp_flags)
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;
unsigned long flags;
Expand Down Expand Up @@ -1962,7 +1962,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
* 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
Expand Down Expand Up @@ -2024,7 +2024,7 @@ static int rndis_control_ack (struct net_device *net)

#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__);

Expand Down Expand Up @@ -2092,7 +2092,7 @@ static int eth_stop (struct net_device *net)
/*-------------------------------------------------------------------------*/

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;

Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/goku_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static int goku_ep_disable(struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/

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;

Expand Down Expand Up @@ -327,7 +327,7 @@ goku_free_request(struct usb_ep *_ep, struct usb_request *_req)
*/
static void *
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;
struct goku_ep *ep;
Expand Down Expand Up @@ -789,7 +789,7 @@ static void abort_dma(struct goku_ep *ep, int status)
/*-------------------------------------------------------------------------*/

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_ep *ep;
Expand Down
12 changes: 6 additions & 6 deletions drivers/usb/gadget/lh7a40x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ static char *state_names[] = {
static int lh7a40x_ep_enable(struct usb_ep *ep,
const struct usb_endpoint_descriptor *);
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_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,
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_set_halt(struct usb_ep *ep, int);
static int lh7a40x_fifo_status(struct usb_ep *ep);
Expand Down Expand Up @@ -1106,7 +1106,7 @@ static int lh7a40x_ep_disable(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;

Expand Down Expand Up @@ -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,
dma_addr_t * dma, unsigned gfp_flags)
dma_addr_t * dma, gfp_t gfp_flags)
{
char *retval;

Expand All @@ -1158,7 +1158,7 @@ static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma,
* NOTE: Sets INDEX register
*/
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_ep *ep;
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/net2280.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static int net2280_disable (struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/

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_request *req;
Expand Down Expand Up @@ -463,7 +463,7 @@ net2280_alloc_buffer (
struct usb_ep *_ep,
unsigned bytes,
dma_addr_t *dma,
unsigned gfp_flags
gfp_t gfp_flags
)
{
void *retval;
Expand Down Expand Up @@ -897,7 +897,7 @@ done (struct net2280_ep *ep, struct net2280_request *req, int status)
/*-------------------------------------------------------------------------*/

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_ep *ep;
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static int omap_ep_disable(struct usb_ep *_ep)
/*-------------------------------------------------------------------------*/

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;

Expand Down Expand Up @@ -298,7 +298,7 @@ omap_alloc_buffer(
struct usb_ep *_ep,
unsigned bytes,
dma_addr_t *dma,
unsigned gfp_flags
gfp_t gfp_flags
)
{
void *retval;
Expand Down Expand Up @@ -937,7 +937,7 @@ static void dma_channel_release(struct omap_ep *ep)
/*-------------------------------------------------------------------------*/

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_req *req = container_of(_req, struct omap_req, req);
Expand Down
6 changes: 3 additions & 3 deletions drivers/usb/gadget/pxa2xx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
* pxa2xx_ep_alloc_request - allocate a request data structure
*/
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;

Expand Down Expand Up @@ -367,7 +367,7 @@ pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
*/
static void *
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;

Expand Down Expand Up @@ -874,7 +874,7 @@ static void dma_nodesc_handler(int dmach, void *_ep, struct pt_regs *r)
/*-------------------------------------------------------------------------*/

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_ep *ep;
Expand Down
Loading

0 comments on commit 55016f1

Please sign in to comment.