[PATCH] USB: convert kcalloc to kzalloc
authorPekka Enberg <penberg@cs.helsinki.fi>
Tue, 6 Sep 2005 22:18:34 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:46 +0000 (16:57 -0700)
This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/usb/atm/usbatm.c
drivers/usb/core/hcd.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/isp116x-hcd.c
drivers/usb/host/sl811-hcd.c
drivers/usb/input/acecad.c
drivers/usb/input/itmtouch.c
drivers/usb/input/pid.c

index bb1db19598549ee10322f9d7ff0562f4f11cad2c..c466739428b2c501eb99c809f02226f55c7c9a76 100644 (file)
@@ -960,7 +960,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
                        intf->altsetting->desc.bInterfaceNumber);
 
        /* instance init */
-       instance = kcalloc(1, sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
+       instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
        if (!instance) {
                dev_dbg(dev, "%s: no memory for instance data!\n", __func__);
                return -ENOMEM;
index 9f44e83c6a6903f3dfb02a89088d1667cbe19812..12ecdb03ee5f20afd3bcef220e8aded0bb30857c 100644 (file)
@@ -1669,7 +1669,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
 {
        struct usb_hcd *hcd;
 
-       hcd = kcalloc(1, sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
+       hcd = kzalloc(sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
        if (!hcd) {
                dev_dbg (dev, "hcd alloc failed\n");
                return NULL;
index b56f25864ed60084028e174e035c552bedc6a331..4c972b57c7c3a5ac1fd026269698f83375f4de1a 100644 (file)
@@ -638,7 +638,7 @@ iso_stream_alloc (unsigned mem_flags)
 {
        struct ehci_iso_stream *stream;
 
-       stream = kcalloc(1, sizeof *stream, mem_flags);
+       stream = kzalloc(sizeof *stream, mem_flags);
        if (likely (stream != NULL)) {
                INIT_LIST_HEAD(&stream->td_list);
                INIT_LIST_HEAD(&stream->free_list);
index 76cb496c5836ca3f222cbe688bf67fe2d6a2f1f7..75128c3718008a698cb0695c3eba0a0589bb2928 100644 (file)
@@ -717,7 +717,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd,
        }
        /* avoid all allocations within spinlocks: request or endpoint */
        if (!hep->hcpriv) {
-               ep = kcalloc(1, sizeof *ep, mem_flags);
+               ep = kzalloc(sizeof *ep, mem_flags);
                if (!ep)
                        return -ENOMEM;
        }
index 80eaf659c1984b0921acd9b956600bcdc0a5b348..d2a1fd40dfcb846e148faef3e9102142c2ba7cc6 100644 (file)
@@ -835,7 +835,7 @@ static int sl811h_urb_enqueue(
 
        /* avoid all allocations within spinlocks */
        if (!hep->hcpriv)
-               ep = kcalloc(1, sizeof *ep, mem_flags);
+               ep = kzalloc(sizeof *ep, mem_flags);
 
        spin_lock_irqsave(&sl811->lock, flags);
 
index 13532f3e3efc4325ea1c4b516d2045fad3cfd0d4..74f8760d7c07c0c689c7fa6fe5e0b50665b670c3 100644 (file)
@@ -152,7 +152,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
        pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
        maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
 
-       acecad = kcalloc(1, sizeof(struct usb_acecad), GFP_KERNEL);
+       acecad = kzalloc(sizeof(struct usb_acecad), GFP_KERNEL);
        if (!acecad)
                return -ENOMEM;
 
index 0dc439f10823a90f1d13bbe4d7658f4c441cf3f3..becb87efb869f6800b8c7829a5dcc71d0fbd8968 100644 (file)
@@ -166,7 +166,7 @@ static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id
        interface = intf->cur_altsetting;
        endpoint = &interface->endpoint[0].desc;
 
-       if (!(itmtouch = kcalloc(1, sizeof(struct itmtouch_dev), GFP_KERNEL))) {
+       if (!(itmtouch = kzalloc(sizeof(struct itmtouch_dev), GFP_KERNEL))) {
                err("%s - Out of memory.", __FUNCTION__);
                return -ENOMEM;
        }
index 25696386347812769419a5f2a870845c0f836b8d..acc71ec560e9578dec1f34dd88dc6d90b523b8f3 100644 (file)
@@ -263,7 +263,7 @@ int hid_pid_init(struct hid_device *hid)
        struct hid_ff_pid *private;
        struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
 
-       private = hid->ff_private = kcalloc(1, sizeof(struct hid_ff_pid), GFP_KERNEL);
+       private = hid->ff_private = kzalloc(sizeof(struct hid_ff_pid), GFP_KERNEL);
        if (!private)
                return -ENOMEM;