]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/misc/ati_remote.c
USB: remove info() macro from usb input drivers
[linux-2.6-omap-h63xx.git] / drivers / input / misc / ati_remote.c
index 3a7937481ad8730d654835d4014557a364c70a3f..e290fde35e74ff626e8e7cde2af795e7d832bbb1 100644 (file)
@@ -90,7 +90,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/usb/input.h>
 #include <linux/wait.h>
 #include <linux/jiffies.h>
@@ -286,7 +285,6 @@ static const struct {
 };
 
 /* Local function prototypes */
-static void ati_remote_dump            (unsigned char *data, unsigned int actual_length);
 static int ati_remote_open             (struct input_dev *inputdev);
 static void ati_remote_close           (struct input_dev *inputdev);
 static int ati_remote_sendpacket       (struct ati_remote *ati_remote, u16 cmd, unsigned char *data);
@@ -308,15 +306,16 @@ static struct usb_driver ati_remote_driver = {
 /*
  *     ati_remote_dump_input
  */
-static void ati_remote_dump(unsigned char *data, unsigned int len)
+static void ati_remote_dump(struct device *dev, unsigned char *data,
+                           unsigned int len)
 {
        if ((len == 1) && (data[0] != (unsigned char)0xff) && (data[0] != 0x00))
-               warn("Weird byte 0x%02x", data[0]);
+               dev_warn(dev, "Weird byte 0x%02x\n", data[0]);
        else if (len == 4)
-               warn("Weird key %02x %02x %02x %02x",
+               dev_warn(dev, "Weird key %02x %02x %02x %02x\n",
                     data[0], data[1], data[2], data[3]);
        else
-               warn("Weird data, len=%d %02x %02x %02x %02x %02x %02x ...",
+               dev_warn(dev, "Weird data, len=%d %02x %02x %02x %02x %02x %02x ...\n",
                     len, data[0], data[1], data[2], data[3], data[4], data[5]);
 }
 
@@ -331,7 +330,7 @@ static int ati_remote_open(struct input_dev *inputdev)
        ati_remote->irq_urb->dev = ati_remote->udev;
        if (usb_submit_urb(ati_remote->irq_urb, GFP_KERNEL)) {
                dev_err(&ati_remote->interface->dev,
-                       "%s: usb_submit_urb failed!\n", __FUNCTION__);
+                       "%s: usb_submit_urb failed!\n", __func__);
                return -EIO;
        }
 
@@ -357,7 +356,7 @@ static void ati_remote_irq_out(struct urb *urb)
 
        if (urb->status) {
                dev_dbg(&ati_remote->interface->dev, "%s: status %d\n",
-                       __FUNCTION__, urb->status);
+                       __func__, urb->status);
                return;
        }
 
@@ -471,7 +470,7 @@ static void ati_remote_input_report(struct urb *urb)
        /* Deal with strange looking inputs */
        if ( (urb->actual_length != 4) || (data[0] != 0x14) ||
                ((data[3] & 0x0f) != 0x00) ) {
-               ati_remote_dump(data, urb->actual_length);
+               ati_remote_dump(&urb->dev->dev, data, urb->actual_length);
                return;
        }
 
@@ -602,17 +601,17 @@ static void ati_remote_irq_in(struct urb *urb)
        case -ENOENT:
        case -ESHUTDOWN:
                dev_dbg(&ati_remote->interface->dev, "%s: urb error status, unlink? \n",
-                       __FUNCTION__);
+                       __func__);
                return;
        default:                /* error */
                dev_dbg(&ati_remote->interface->dev, "%s: Nonzero urb status %d\n",
-                       __FUNCTION__, urb->status);
+                       __func__, urb->status);
        }
 
        retval = usb_submit_urb(urb, GFP_ATOMIC);
        if (retval)
                dev_err(&ati_remote->interface->dev, "%s: usb_submit_urb()=%d\n",
-                       __FUNCTION__, retval);
+                       __func__, retval);
 }
 
 /*
@@ -735,7 +734,7 @@ static int ati_remote_probe(struct usb_interface *interface, const struct usb_de
        int err = -ENOMEM;
 
        if (iface_host->desc.bNumEndpoints != 2) {
-               err("%s: Unexpected desc.bNumEndpoints\n", __FUNCTION__);
+               err("%s: Unexpected desc.bNumEndpoints\n", __func__);
                return -ENODEV;
        }
 
@@ -743,11 +742,11 @@ static int ati_remote_probe(struct usb_interface *interface, const struct usb_de
        endpoint_out = &iface_host->endpoint[1].desc;
 
        if (!usb_endpoint_is_int_in(endpoint_in)) {
-               err("%s: Unexpected endpoint_in\n", __FUNCTION__);
+               err("%s: Unexpected endpoint_in\n", __func__);
                return -ENODEV;
        }
        if (le16_to_cpu(endpoint_in->wMaxPacketSize) == 0) {
-               err("%s: endpoint_in message size==0? \n", __FUNCTION__);
+               err("%s: endpoint_in message size==0? \n", __func__);
                return -ENODEV;
        }
 
@@ -815,7 +814,7 @@ static void ati_remote_disconnect(struct usb_interface *interface)
        ati_remote = usb_get_intfdata(interface);
        usb_set_intfdata(interface, NULL);
        if (!ati_remote) {
-               warn("%s - null device?\n", __FUNCTION__);
+               dev_warn(&interface->dev, "%s - null device?\n", __func__);
                return;
        }
 
@@ -835,9 +834,11 @@ static int __init ati_remote_init(void)
 
        result = usb_register(&ati_remote_driver);
        if (result)
-               err("usb_register error #%d\n", result);
+               printk(KERN_ERR KBUILD_MODNAME
+                      ": usb_register error #%d\n", result);
        else
-               info("Registered USB driver " DRIVER_DESC " v. " DRIVER_VERSION);
+               printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+                      DRIVER_DESC "\n");
 
        return result;
 }