diff options
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r-- | drivers/usb/serial/mos7840.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 5b71962d0351..5432c6340086 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -826,7 +826,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp) | |||
826 | 826 | ||
827 | /* Initialising the write urb pool */ | 827 | /* Initialising the write urb pool */ |
828 | for (j = 0; j < NUM_URBS; ++j) { | 828 | for (j = 0; j < NUM_URBS; ++j) { |
829 | urb = usb_alloc_urb(0, SLAB_ATOMIC); | 829 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
830 | mos7840_port->write_urb_pool[j] = urb; | 830 | mos7840_port->write_urb_pool[j] = urb; |
831 | 831 | ||
832 | if (urb == NULL) { | 832 | if (urb == NULL) { |
@@ -2596,12 +2596,11 @@ static int mos7840_startup(struct usb_serial *serial) | |||
2596 | 2596 | ||
2597 | /* set up port private structures */ | 2597 | /* set up port private structures */ |
2598 | for (i = 0; i < serial->num_ports; ++i) { | 2598 | for (i = 0; i < serial->num_ports; ++i) { |
2599 | mos7840_port = kmalloc(sizeof(struct moschip_port), GFP_KERNEL); | 2599 | mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); |
2600 | if (mos7840_port == NULL) { | 2600 | if (mos7840_port == NULL) { |
2601 | err("%s - Out of memory", __FUNCTION__); | 2601 | err("%s - Out of memory", __FUNCTION__); |
2602 | return -ENOMEM; | 2602 | return -ENOMEM; |
2603 | } | 2603 | } |
2604 | memset(mos7840_port, 0, sizeof(struct moschip_port)); | ||
2605 | 2604 | ||
2606 | /* Initialize all port interrupt end point to port 0 int endpoint * | 2605 | /* Initialize all port interrupt end point to port 0 int endpoint * |
2607 | * Our device has only one interrupt end point comman to all port */ | 2606 | * Our device has only one interrupt end point comman to all port */ |
@@ -2787,7 +2786,7 @@ static int mos7840_startup(struct usb_serial *serial) | |||
2787 | i + 1, status); | 2786 | i + 1, status); |
2788 | 2787 | ||
2789 | } | 2788 | } |
2790 | mos7840_port->control_urb = usb_alloc_urb(0, SLAB_ATOMIC); | 2789 | mos7840_port->control_urb = usb_alloc_urb(0, GFP_ATOMIC); |
2791 | mos7840_port->ctrl_buf = kmalloc(16, GFP_KERNEL); | 2790 | mos7840_port->ctrl_buf = kmalloc(16, GFP_KERNEL); |
2792 | 2791 | ||
2793 | } | 2792 | } |