Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5db539e4 authored by Olav Kongas's avatar Olav Kongas Committed by Greg Kroah-Hartman
Browse files

[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: default avatarOlav Kongas <ok@artecdesign.ee>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 17f8bb73
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ void hcd_buffer_destroy (struct usb_hcd *hcd)
void *hcd_buffer_alloc (
	struct usb_bus 		*bus,
	size_t			size,
	int			mem_flags,
	unsigned		mem_flags,
	dma_addr_t		*dma
)
{
+1 −1
Original line number Diff line number Diff line
@@ -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, int mem_flags)
static int hcd_submit_urb (struct urb *urb, unsigned mem_flags)
{
	int			status;
	struct usb_hcd		*hcd = urb->dev->bus->hcpriv;
+4 −4
Original line number Diff line number Diff line
@@ -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, int mem_flags);
	int (*submit_urb) (struct urb *urb, unsigned 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,
			int mem_flags,
			unsigned mem_flags,
			dma_addr_t *dma);
	void (*buffer_free)(struct usb_bus *bus, size_t size,
			void *addr, dma_addr_t dma);
@@ -200,7 +200,7 @@ struct hc_driver {
	int	(*urb_enqueue) (struct usb_hcd *hcd,
					struct usb_host_endpoint *ep,
					struct urb *urb,
					int mem_flags);
					unsigned mem_flags);
	int	(*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);

	/* hw synch, freeing endpoint resources that urb_dequeue can't */
@@ -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,
	int mem_flags, dma_addr_t *dma);
	unsigned mem_flags, dma_addr_t *dma);
void hcd_buffer_free (struct usb_bus *bus, size_t size,
	void *addr, dma_addr_t dma);

+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ int usb_sg_init (
	struct scatterlist	*sg,
	int			nents,
	size_t			length,
	int			mem_flags
	unsigned		mem_flags
)
{
	int			i;
+2 −2
Original line number Diff line number Diff line
@@ -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, int mem_flags)
struct urb *usb_alloc_urb(int iso_packets, unsigned mem_flags)
{
	struct urb *urb;

@@ -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, int mem_flags)
int usb_submit_urb(struct urb *urb, unsigned mem_flags)
{
	int			pipe, temp, max;
	struct usb_device	*dev;
Loading