diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/serial.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/hc_crisv10.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/auerswald.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/digi_acceleport.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/io_ti.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ipaq.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 4 | ||||
-rw-r--r-- | drivers/usb/storage/sddr09.c | 2 |
12 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 5516c59ed5ec..2d12bf9f19d6 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -2195,7 +2195,7 @@ static struct gs_buf *gs_buf_alloc(unsigned int size, gfp_t kmalloc_flags) | |||
2195 | if (size == 0) | 2195 | if (size == 0) |
2196 | return NULL; | 2196 | return NULL; |
2197 | 2197 | ||
2198 | gb = (struct gs_buf *)kmalloc(sizeof(struct gs_buf), kmalloc_flags); | 2198 | gb = kmalloc(sizeof(struct gs_buf), kmalloc_flags); |
2199 | if (gb == NULL) | 2199 | if (gb == NULL) |
2200 | return NULL; | 2200 | return NULL; |
2201 | 2201 | ||
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c index 9325e46a68c0..282d82efc0b0 100644 --- a/drivers/usb/host/hc_crisv10.c +++ b/drivers/usb/host/hc_crisv10.c | |||
@@ -365,7 +365,7 @@ static inline struct urb *urb_list_first(int epid) | |||
365 | /* Adds an urb_entry last in the list for this epid. */ | 365 | /* Adds an urb_entry last in the list for this epid. */ |
366 | static inline void urb_list_add(struct urb *urb, int epid) | 366 | static inline void urb_list_add(struct urb *urb, int epid) |
367 | { | 367 | { |
368 | urb_entry_t *urb_entry = (urb_entry_t *)kmalloc(sizeof(urb_entry_t), KMALLOC_FLAG); | 368 | urb_entry_t *urb_entry = kmalloc(sizeof(urb_entry_t), KMALLOC_FLAG); |
369 | assert(urb_entry); | 369 | assert(urb_entry); |
370 | 370 | ||
371 | urb_entry->urb = urb; | 371 | urb_entry->urb = urb; |
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c index c703f73e1655..6c7f3efb1d40 100644 --- a/drivers/usb/misc/auerswald.c +++ b/drivers/usb/misc/auerswald.c | |||
@@ -766,7 +766,7 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned | |||
766 | bep->bufp = kmalloc (bufsize, GFP_KERNEL); | 766 | bep->bufp = kmalloc (bufsize, GFP_KERNEL); |
767 | if (!bep->bufp) | 767 | if (!bep->bufp) |
768 | goto bl_fail; | 768 | goto bl_fail; |
769 | bep->dr = (struct usb_ctrlrequest *) kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL); | 769 | bep->dr = kmalloc(sizeof (struct usb_ctrlrequest), GFP_KERNEL); |
770 | if (!bep->dr) | 770 | if (!bep->dr) |
771 | goto bl_fail; | 771 | goto bl_fail; |
772 | bep->urbp = usb_alloc_urb (0, GFP_KERNEL); | 772 | bep->urbp = usb_alloc_urb (0, GFP_KERNEL); |
@@ -1969,7 +1969,7 @@ static int auerswald_probe (struct usb_interface *intf, | |||
1969 | info("device is a %s", cp->dev_desc); | 1969 | info("device is a %s", cp->dev_desc); |
1970 | 1970 | ||
1971 | /* get the maximum allowed control transfer length */ | 1971 | /* get the maximum allowed control transfer length */ |
1972 | pbuf = (__le16 *) kmalloc (2, GFP_KERNEL); /* use an allocated buffer because of urb target */ | 1972 | pbuf = kmalloc(2, GFP_KERNEL); /* use an allocated buffer because of urb target */ |
1973 | if (!pbuf) { | 1973 | if (!pbuf) { |
1974 | err( "out of memory"); | 1974 | err( "out of memory"); |
1975 | goto pfail; | 1975 | goto pfail; |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index a1fdb85b8c0a..45cdf9bc43b2 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -1493,7 +1493,7 @@ static struct cypress_buf *cypress_buf_alloc(unsigned int size) | |||
1493 | if (size == 0) | 1493 | if (size == 0) |
1494 | return NULL; | 1494 | return NULL; |
1495 | 1495 | ||
1496 | cb = (struct cypress_buf *)kmalloc(sizeof(struct cypress_buf), GFP_KERNEL); | 1496 | cb = kmalloc(sizeof(struct cypress_buf), GFP_KERNEL); |
1497 | if (cb == NULL) | 1497 | if (cb == NULL) |
1498 | return NULL; | 1498 | return NULL; |
1499 | 1499 | ||
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 9d9ea874639c..efd9ce3f931f 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -1681,7 +1681,7 @@ dbg( "digi_startup: TOP" ); | |||
1681 | for( i=0; i<serial->type->num_ports+1; i++ ) { | 1681 | for( i=0; i<serial->type->num_ports+1; i++ ) { |
1682 | 1682 | ||
1683 | /* allocate port private structure */ | 1683 | /* allocate port private structure */ |
1684 | priv = (struct digi_port *)kmalloc( sizeof(struct digi_port), | 1684 | priv = kmalloc( sizeof(struct digi_port), |
1685 | GFP_KERNEL ); | 1685 | GFP_KERNEL ); |
1686 | if( priv == (struct digi_port *)0 ) { | 1686 | if( priv == (struct digi_port *)0 ) { |
1687 | while( --i >= 0 ) | 1687 | while( --i >= 0 ) |
@@ -1714,7 +1714,7 @@ dbg( "digi_startup: TOP" ); | |||
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | /* allocate serial private structure */ | 1716 | /* allocate serial private structure */ |
1717 | serial_priv = (struct digi_serial *)kmalloc( sizeof(struct digi_serial), | 1717 | serial_priv = kmalloc( sizeof(struct digi_serial), |
1718 | GFP_KERNEL ); | 1718 | GFP_KERNEL ); |
1719 | if( serial_priv == (struct digi_serial *)0 ) { | 1719 | if( serial_priv == (struct digi_serial *)0 ) { |
1720 | for( i=0; i<serial->type->num_ports+1; i++ ) | 1720 | for( i=0; i<serial->type->num_ports+1; i++ ) |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 2da2684e0809..980285c0233a 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -2811,7 +2811,7 @@ static struct edge_buf *edge_buf_alloc(unsigned int size) | |||
2811 | if (size == 0) | 2811 | if (size == 0) |
2812 | return NULL; | 2812 | return NULL; |
2813 | 2813 | ||
2814 | eb = (struct edge_buf *)kmalloc(sizeof(struct edge_buf), GFP_KERNEL); | 2814 | eb = kmalloc(sizeof(struct edge_buf), GFP_KERNEL); |
2815 | if (eb == NULL) | 2815 | if (eb == NULL) |
2816 | return NULL; | 2816 | return NULL; |
2817 | 2817 | ||
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index d72cf8bc7f76..42f757a5b876 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -595,7 +595,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) | |||
595 | 595 | ||
596 | bytes_in = 0; | 596 | bytes_in = 0; |
597 | bytes_out = 0; | 597 | bytes_out = 0; |
598 | priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); | 598 | priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); |
599 | if (priv == NULL) { | 599 | if (priv == NULL) { |
600 | err("%s - Out of memory", __FUNCTION__); | 600 | err("%s - Out of memory", __FUNCTION__); |
601 | return -ENOMEM; | 601 | return -ENOMEM; |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index e284d6c0fd35..62bea0c923bd 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -269,7 +269,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp) | |||
269 | } | 269 | } |
270 | 270 | ||
271 | // allocate memory for write_urb transfer buffer | 271 | // allocate memory for write_urb transfer buffer |
272 | port->write_urb->transfer_buffer = (unsigned char *) kmalloc(write_urb_transfer_buffer_length, GFP_KERNEL); | 272 | port->write_urb->transfer_buffer = kmalloc(write_urb_transfer_buffer_length, GFP_KERNEL); |
273 | if (! port->write_urb->transfer_buffer) { | 273 | if (! port->write_urb->transfer_buffer) { |
274 | kfree(transfer_buffer); | 274 | kfree(transfer_buffer); |
275 | usb_free_urb(port->write_urb); | 275 | usb_free_urb(port->write_urb); |
@@ -696,7 +696,7 @@ static int kobil_ioctl(struct usb_serial_port *port, struct file *file, | |||
696 | return 0; | 696 | return 0; |
697 | 697 | ||
698 | case TCFLSH: // 0x540B | 698 | case TCFLSH: // 0x540B |
699 | transfer_buffer = (unsigned char *) kmalloc(transfer_buffer_length, GFP_KERNEL); | 699 | transfer_buffer = kmalloc(transfer_buffer_length, GFP_KERNEL); |
700 | if (! transfer_buffer) { | 700 | if (! transfer_buffer) { |
701 | return -ENOBUFS; | 701 | return -ENOBUFS; |
702 | } | 702 | } |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index d124d780e42e..5dc2ac9afa90 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -159,7 +159,7 @@ static struct pl2303_buf *pl2303_buf_alloc(unsigned int size) | |||
159 | if (size == 0) | 159 | if (size == 0) |
160 | return NULL; | 160 | return NULL; |
161 | 161 | ||
162 | pb = (struct pl2303_buf *)kmalloc(sizeof(struct pl2303_buf), GFP_KERNEL); | 162 | pb = kmalloc(sizeof(struct pl2303_buf), GFP_KERNEL); |
163 | if (pb == NULL) | 163 | if (pb == NULL) |
164 | return NULL; | 164 | return NULL; |
165 | 165 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index f42eb9ea6405..83189005c6fb 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -1710,7 +1710,7 @@ static struct circ_buf *ti_buf_alloc(void) | |||
1710 | { | 1710 | { |
1711 | struct circ_buf *cb; | 1711 | struct circ_buf *cb; |
1712 | 1712 | ||
1713 | cb = (struct circ_buf *)kmalloc(sizeof(struct circ_buf), GFP_KERNEL); | 1713 | cb = kmalloc(sizeof(struct circ_buf), GFP_KERNEL); |
1714 | if (cb == NULL) | 1714 | if (cb == NULL) |
1715 | return NULL; | 1715 | return NULL; |
1716 | 1716 | ||
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index dc45e58e2b8c..5483d8564c1b 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -416,7 +416,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
416 | for (i = 0; i < serial->num_ports; i++) { | 416 | for (i = 0; i < serial->num_ports; i++) { |
417 | port = serial->port[i]; | 417 | port = serial->port[i]; |
418 | 418 | ||
419 | info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); | 419 | info = kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL); |
420 | if (info == NULL) { | 420 | if (info == NULL) { |
421 | err("%s: Out of memory for port structures\n", serial->type->description); | 421 | err("%s: Out of memory for port structures\n", serial->type->description); |
422 | goto no_private; | 422 | goto no_private; |
@@ -487,7 +487,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
487 | usb_set_serial_port_data(port, info); | 487 | usb_set_serial_port_data(port, info); |
488 | } | 488 | } |
489 | 489 | ||
490 | command_info = (struct whiteheat_command_private *)kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL); | 490 | command_info = kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL); |
491 | if (command_info == NULL) { | 491 | if (command_info == NULL) { |
492 | err("%s: Out of memory for port structures\n", serial->type->description); | 492 | err("%s: Out of memory for port structures\n", serial->type->description); |
493 | goto no_command_private; | 493 | goto no_command_private; |
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index fb8bacaae27c..e3528eca29a5 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c | |||
@@ -646,7 +646,7 @@ sddr09_read_sg_test_only(struct us_data *us) { | |||
646 | return result; | 646 | return result; |
647 | } | 647 | } |
648 | 648 | ||
649 | buf = (unsigned char *) kmalloc(bulklen, GFP_NOIO); | 649 | buf = kmalloc(bulklen, GFP_NOIO); |
650 | if (!buf) | 650 | if (!buf) |
651 | return -ENOMEM; | 651 | return -ENOMEM; |
652 | 652 | ||