]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/misc/cypress_cy7c63.c
USB: remove err() macro from usb misc drivers
[linux-2.6-omap-h63xx.git] / drivers / usb / misc / cypress_cy7c63.c
index b63b5f34b2aa5f0f79b7103c9e14ce9e89f2b2a7..5720bfef6a389ada6709be2ffac3aca06a1d969a 100644 (file)
@@ -1,7 +1,7 @@
 /*
 * cypress_cy7c63.c
 *
-* Copyright (c) 2006 Oliver Bock (o.bock@fh-wolfenbuettel.de)
+* Copyright (c) 2006-2007 Oliver Bock (bock@tfh-berlin.de)
 *
 *      This driver is based on the Cypress USB Driver by Marcus Maul
 *      (cyport) and the 2.0 version of Greg Kroah-Hartman's
@@ -21,6 +21,9 @@
 *      Supported functions:    Read/Write Ports
 *
 *
+*      For up-to-date information please visit:
+*      http://www.obock.de/kernel/cypress
+*
 *      This program is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU General Public License as
 *      published by the Free Software Foundation, version 2.
@@ -31,7 +34,7 @@
 #include <linux/kernel.h>
 #include <linux/usb.h>
 
-#define DRIVER_AUTHOR          "Oliver Bock (o.bock@fh-wolfenbuettel.de)"
+#define DRIVER_AUTHOR          "Oliver Bock (bock@tfh-berlin.de)"
 #define DRIVER_DESC            "Cypress CY7C63xxx USB driver"
 
 #define CYPRESS_VENDOR_ID      0xa2c
@@ -246,11 +249,13 @@ static void cypress_disconnect(struct usb_interface *interface)
        struct cypress *dev;
 
        dev = usb_get_intfdata(interface);
-       usb_set_intfdata(interface, NULL);
 
        /* remove device attribute files */
        device_remove_file(&interface->dev, &dev_attr_port0);
        device_remove_file(&interface->dev, &dev_attr_port1);
+       /* the intfdata can be set to NULL only after the
+        * device files have been removed */
+       usb_set_intfdata(interface, NULL);
 
        usb_put_dev(dev->udev);
 
@@ -273,9 +278,9 @@ static int __init cypress_init(void)
 
        /* register this driver with the USB subsystem */
        result = usb_register(&cypress_driver);
-       if (result) {
-               err("Function usb_register failed! Error number: %d\n", result);
-       }
+       if (result)
+               printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! "
+                      "Error number: %d\n", result);
 
        return result;
 }