aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 07:17:25 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:38 -0400
commit997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch)
tree65e021973e5a48ad7290d5be1f441940566468ad /drivers/input/tablet
parent48679c6d772b1459a2945729e3a1256ac78fcabf (diff)
USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/acecad.c6
-rw-r--r--drivers/input/tablet/aiptek.c14
-rw-r--r--drivers/input/tablet/gtco.c12
-rw-r--r--drivers/input/tablet/kbtab.c6
-rw-r--r--drivers/input/tablet/wacom_sys.c10
5 files changed, 24 insertions, 24 deletions
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index 670c61c5a516..c0470163dc67 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -155,7 +155,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
155 goto fail1; 155 goto fail1;
156 } 156 }
157 157
158 acecad->data = usb_buffer_alloc(dev, 8, GFP_KERNEL, &acecad->data_dma); 158 acecad->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &acecad->data_dma);
159 if (!acecad->data) { 159 if (!acecad->data) {
160 err= -ENOMEM; 160 err= -ENOMEM;
161 goto fail1; 161 goto fail1;
@@ -241,7 +241,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
241 241
242 return 0; 242 return 0;
243 243
244 fail2: usb_buffer_free(dev, 8, acecad->data, acecad->data_dma); 244 fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma);
245 fail1: input_free_device(input_dev); 245 fail1: input_free_device(input_dev);
246 kfree(acecad); 246 kfree(acecad);
247 return err; 247 return err;
@@ -256,7 +256,7 @@ static void usb_acecad_disconnect(struct usb_interface *intf)
256 usb_kill_urb(acecad->irq); 256 usb_kill_urb(acecad->irq);
257 input_unregister_device(acecad->input); 257 input_unregister_device(acecad->input);
258 usb_free_urb(acecad->irq); 258 usb_free_urb(acecad->irq);
259 usb_buffer_free(interface_to_usbdev(intf), 10, acecad->data, acecad->data_dma); 259 usb_free_coherent(interface_to_usbdev(intf), 10, acecad->data, acecad->data_dma);
260 kfree(acecad); 260 kfree(acecad);
261 } 261 }
262} 262}
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 4be039d7dcad..51b80b08d467 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1711,8 +1711,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1711 goto fail1; 1711 goto fail1;
1712 } 1712 }
1713 1713
1714 aiptek->data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH, 1714 aiptek->data = usb_alloc_coherent(usbdev, AIPTEK_PACKET_LENGTH,
1715 GFP_ATOMIC, &aiptek->data_dma); 1715 GFP_ATOMIC, &aiptek->data_dma);
1716 if (!aiptek->data) { 1716 if (!aiptek->data) {
1717 dev_warn(&intf->dev, "cannot allocate usb buffer\n"); 1717 dev_warn(&intf->dev, "cannot allocate usb buffer\n");
1718 goto fail1; 1718 goto fail1;
@@ -1884,8 +1884,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1884 1884
1885 fail4: sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group); 1885 fail4: sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group);
1886 fail3: usb_free_urb(aiptek->urb); 1886 fail3: usb_free_urb(aiptek->urb);
1887 fail2: usb_buffer_free(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data, 1887 fail2: usb_free_coherent(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data,
1888 aiptek->data_dma); 1888 aiptek->data_dma);
1889 fail1: usb_set_intfdata(intf, NULL); 1889 fail1: usb_set_intfdata(intf, NULL);
1890 input_free_device(inputdev); 1890 input_free_device(inputdev);
1891 kfree(aiptek); 1891 kfree(aiptek);
@@ -1909,9 +1909,9 @@ static void aiptek_disconnect(struct usb_interface *intf)
1909 input_unregister_device(aiptek->inputdev); 1909 input_unregister_device(aiptek->inputdev);
1910 sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group); 1910 sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group);
1911 usb_free_urb(aiptek->urb); 1911 usb_free_urb(aiptek->urb);
1912 usb_buffer_free(interface_to_usbdev(intf), 1912 usb_free_coherent(interface_to_usbdev(intf),
1913 AIPTEK_PACKET_LENGTH, 1913 AIPTEK_PACKET_LENGTH,
1914 aiptek->data, aiptek->data_dma); 1914 aiptek->data, aiptek->data_dma);
1915 kfree(aiptek); 1915 kfree(aiptek);
1916 } 1916 }
1917} 1917}
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index 866a9ee1af1a..8ea6afe2e992 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -850,8 +850,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
850 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); 850 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface));
851 851
852 /* Allocate some data for incoming reports */ 852 /* Allocate some data for incoming reports */
853 gtco->buffer = usb_buffer_alloc(gtco->usbdev, REPORT_MAX_SIZE, 853 gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE,
854 GFP_KERNEL, &gtco->buf_dma); 854 GFP_KERNEL, &gtco->buf_dma);
855 if (!gtco->buffer) { 855 if (!gtco->buffer) {
856 err("No more memory for us buffers"); 856 err("No more memory for us buffers");
857 error = -ENOMEM; 857 error = -ENOMEM;
@@ -982,8 +982,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
982 err_free_urb: 982 err_free_urb:
983 usb_free_urb(gtco->urbinfo); 983 usb_free_urb(gtco->urbinfo);
984 err_free_buf: 984 err_free_buf:
985 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 985 usb_free_coherent(gtco->usbdev, REPORT_MAX_SIZE,
986 gtco->buffer, gtco->buf_dma); 986 gtco->buffer, gtco->buf_dma);
987 err_free_devs: 987 err_free_devs:
988 input_free_device(input_dev); 988 input_free_device(input_dev);
989 kfree(gtco); 989 kfree(gtco);
@@ -1005,8 +1005,8 @@ static void gtco_disconnect(struct usb_interface *interface)
1005 input_unregister_device(gtco->inputdevice); 1005 input_unregister_device(gtco->inputdevice);
1006 usb_kill_urb(gtco->urbinfo); 1006 usb_kill_urb(gtco->urbinfo);
1007 usb_free_urb(gtco->urbinfo); 1007 usb_free_urb(gtco->urbinfo);
1008 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 1008 usb_free_coherent(gtco->usbdev, REPORT_MAX_SIZE,
1009 gtco->buffer, gtco->buf_dma); 1009 gtco->buffer, gtco->buf_dma);
1010 kfree(gtco); 1010 kfree(gtco);
1011 } 1011 }
1012 1012
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c
index 6682b17bf844..d31b9c793554 100644
--- a/drivers/input/tablet/kbtab.c
+++ b/drivers/input/tablet/kbtab.c
@@ -129,7 +129,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
129 if (!kbtab || !input_dev) 129 if (!kbtab || !input_dev)
130 goto fail1; 130 goto fail1;
131 131
132 kbtab->data = usb_buffer_alloc(dev, 8, GFP_KERNEL, &kbtab->data_dma); 132 kbtab->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &kbtab->data_dma);
133 if (!kbtab->data) 133 if (!kbtab->data)
134 goto fail1; 134 goto fail1;
135 135
@@ -182,7 +182,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
182 return 0; 182 return 0;
183 183
184 fail3: usb_free_urb(kbtab->irq); 184 fail3: usb_free_urb(kbtab->irq);
185 fail2: usb_buffer_free(dev, 10, kbtab->data, kbtab->data_dma); 185 fail2: usb_free_coherent(dev, 10, kbtab->data, kbtab->data_dma);
186 fail1: input_free_device(input_dev); 186 fail1: input_free_device(input_dev);
187 kfree(kbtab); 187 kfree(kbtab);
188 return error; 188 return error;
@@ -197,7 +197,7 @@ static void kbtab_disconnect(struct usb_interface *intf)
197 usb_kill_urb(kbtab->irq); 197 usb_kill_urb(kbtab->irq);
198 input_unregister_device(kbtab->dev); 198 input_unregister_device(kbtab->dev);
199 usb_free_urb(kbtab->irq); 199 usb_free_urb(kbtab->irq);
200 usb_buffer_free(interface_to_usbdev(intf), 10, kbtab->data, kbtab->data_dma); 200 usb_free_coherent(interface_to_usbdev(intf), 10, kbtab->data, kbtab->data_dma);
201 kfree(kbtab); 201 kfree(kbtab);
202 } 202 }
203} 203}
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index f46502589e4e..191197cd83e3 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -556,8 +556,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
556 goto fail1; 556 goto fail1;
557 } 557 }
558 558
559 wacom_wac->data = usb_buffer_alloc(dev, WACOM_PKGLEN_MAX, 559 wacom_wac->data = usb_alloc_coherent(dev, WACOM_PKGLEN_MAX,
560 GFP_KERNEL, &wacom->data_dma); 560 GFP_KERNEL, &wacom->data_dma);
561 if (!wacom_wac->data) { 561 if (!wacom_wac->data) {
562 error = -ENOMEM; 562 error = -ENOMEM;
563 goto fail1; 563 goto fail1;
@@ -633,7 +633,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
633 return 0; 633 return 0;
634 634
635 fail3: usb_free_urb(wacom->irq); 635 fail3: usb_free_urb(wacom->irq);
636 fail2: usb_buffer_free(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma); 636 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma);
637 fail1: input_free_device(input_dev); 637 fail1: input_free_device(input_dev);
638 kfree(wacom); 638 kfree(wacom);
639 kfree(wacom_wac); 639 kfree(wacom_wac);
@@ -649,8 +649,8 @@ static void wacom_disconnect(struct usb_interface *intf)
649 usb_kill_urb(wacom->irq); 649 usb_kill_urb(wacom->irq);
650 input_unregister_device(wacom->dev); 650 input_unregister_device(wacom->dev);
651 usb_free_urb(wacom->irq); 651 usb_free_urb(wacom->irq);
652 usb_buffer_free(interface_to_usbdev(intf), WACOM_PKGLEN_MAX, 652 usb_free_coherent(interface_to_usbdev(intf), WACOM_PKGLEN_MAX,
653 wacom->wacom_wac->data, wacom->data_dma); 653 wacom->wacom_wac->data, wacom->data_dma);
654 kfree(wacom->wacom_wac); 654 kfree(wacom->wacom_wac);
655 kfree(wacom); 655 kfree(wacom);
656} 656}