aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/aiptek.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r--drivers/input/tablet/aiptek.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index e53c838f1866..7d005a3616d7 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1706,20 +1706,21 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1706 aiptek = kzalloc(sizeof(struct aiptek), GFP_KERNEL); 1706 aiptek = kzalloc(sizeof(struct aiptek), GFP_KERNEL);
1707 inputdev = input_allocate_device(); 1707 inputdev = input_allocate_device();
1708 if (!aiptek || !inputdev) { 1708 if (!aiptek || !inputdev) {
1709 warn("aiptek: cannot allocate memory or input device"); 1709 dev_warn(&intf->dev,
1710 "cannot allocate memory or input device\n");
1710 goto fail1; 1711 goto fail1;
1711 } 1712 }
1712 1713
1713 aiptek->data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH, 1714 aiptek->data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH,
1714 GFP_ATOMIC, &aiptek->data_dma); 1715 GFP_ATOMIC, &aiptek->data_dma);
1715 if (!aiptek->data) { 1716 if (!aiptek->data) {
1716 warn("aiptek: cannot allocate usb buffer"); 1717 dev_warn(&intf->dev, "cannot allocate usb buffer\n");
1717 goto fail1; 1718 goto fail1;
1718 } 1719 }
1719 1720
1720 aiptek->urb = usb_alloc_urb(0, GFP_KERNEL); 1721 aiptek->urb = usb_alloc_urb(0, GFP_KERNEL);
1721 if (!aiptek->urb) { 1722 if (!aiptek->urb) {
1722 warn("aiptek: cannot allocate urb"); 1723 dev_warn(&intf->dev, "cannot allocate urb\n");
1723 goto fail2; 1724 goto fail2;
1724 } 1725 }
1725 1726
@@ -1843,8 +1844,9 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1843 aiptek->curSetting.programmableDelay = speeds[i]; 1844 aiptek->curSetting.programmableDelay = speeds[i];
1844 (void)aiptek_program_tablet(aiptek); 1845 (void)aiptek_program_tablet(aiptek);
1845 if (aiptek->inputdev->absmax[ABS_X] > 0) { 1846 if (aiptek->inputdev->absmax[ABS_X] > 0) {
1846 info("input: Aiptek using %d ms programming speed\n", 1847 dev_info(&intf->dev,
1847 aiptek->curSetting.programmableDelay); 1848 "Aiptek using %d ms programming speed\n",
1849 aiptek->curSetting.programmableDelay);
1848 break; 1850 break;
1849 } 1851 }
1850 } 1852 }
@@ -1852,7 +1854,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1852 /* Murphy says that some day someone will have a tablet that fails the 1854 /* Murphy says that some day someone will have a tablet that fails the
1853 above test. That's you, Frederic Rodrigo */ 1855 above test. That's you, Frederic Rodrigo */
1854 if (i == ARRAY_SIZE(speeds)) { 1856 if (i == ARRAY_SIZE(speeds)) {
1855 info("input: Aiptek tried all speeds, no sane response"); 1857 dev_info(&intf->dev,
1858 "Aiptek tried all speeds, no sane response\n");
1856 goto fail2; 1859 goto fail2;
1857 } 1860 }
1858 1861
@@ -1864,7 +1867,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1864 */ 1867 */
1865 err = sysfs_create_group(&intf->dev.kobj, &aiptek_attribute_group); 1868 err = sysfs_create_group(&intf->dev.kobj, &aiptek_attribute_group);
1866 if (err) { 1869 if (err) {
1867 warn("aiptek: cannot create sysfs group err: %d", err); 1870 dev_warn(&intf->dev, "cannot create sysfs group err: %d\n",
1871 err);
1868 goto fail3; 1872 goto fail3;
1869 } 1873 }
1870 1874
@@ -1872,7 +1876,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1872 */ 1876 */
1873 err = input_register_device(aiptek->inputdev); 1877 err = input_register_device(aiptek->inputdev);
1874 if (err) { 1878 if (err) {
1875 warn("aiptek: input_register_device returned err: %d", err); 1879 dev_warn(&intf->dev,
1880 "input_register_device returned err: %d\n", err);
1876 goto fail4; 1881 goto fail4;
1877 } 1882 }
1878 return 0; 1883 return 0;
@@ -1922,8 +1927,9 @@ static int __init aiptek_init(void)
1922{ 1927{
1923 int result = usb_register(&aiptek_driver); 1928 int result = usb_register(&aiptek_driver);
1924 if (result == 0) { 1929 if (result == 0) {
1925 info(DRIVER_VERSION ": " DRIVER_AUTHOR); 1930 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
1926 info(DRIVER_DESC); 1931 DRIVER_DESC "\n");
1932 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_AUTHOR "\n");
1927 } 1933 }
1928 return result; 1934 return result;
1929} 1935}