Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / drivers / usb / host / ohci-dbg.c
index 7924c74..0f47a57 100644 (file)
@@ -193,10 +193,6 @@ ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size)
 
        maybe_print_eds (controller, "donehead",
                        ohci_readl (controller, &regs->donehead), next, size);
-
-       /* broken fminterval means traffic won't flow! */ 
-       ohci_dbg (controller, "fminterval %08x\n", 
-                       ohci_readl (controller, &regs->fminterval));
 }
 
 #define dbg_port_sw(hc,num,value,next,size) \
@@ -481,7 +477,7 @@ show_async (struct class_device *class_dev, char *buf)
        unsigned long           flags;
 
        bus = class_get_devdata(class_dev);
-       hcd = bus->hcpriv;
+       hcd = bus_to_hcd(bus);
        ohci = hcd_to_ohci(hcd);
 
        /* display control and bulk lists together, for simplicity */
@@ -509,12 +505,12 @@ show_periodic (struct class_device *class_dev, char *buf)
        char                    *next;
        unsigned                i;
 
-       if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC)))
+       if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC)))
                return 0;
        seen_count = 0;
 
        bus = class_get_devdata(class_dev);
-       hcd = bus->hcpriv;
+       hcd = bus_to_hcd(bus);
        ohci = hcd_to_ohci(hcd);
        next = buf;
        size = PAGE_SIZE;
@@ -611,7 +607,7 @@ show_registers (struct class_device *class_dev, char *buf)
        u32                     rdata;
 
        bus = class_get_devdata(class_dev);
-       hcd = bus->hcpriv;
+       hcd = bus_to_hcd(bus);
        ohci = hcd_to_ohci(hcd);
        regs = ohci->regs;
        next = buf;
@@ -671,6 +667,11 @@ show_registers (struct class_device *class_dev, char *buf)
        size -= temp;
        next += temp;
 
+       temp = scnprintf (next, size, "hub poll timer %s\n",
+                       ohci_to_hcd(ohci)->poll_rh ? "ON" : "off");
+       size -= temp;
+       next += temp;
+
        /* roothub */
        ohci_dump_roothub (ohci, 1, &next, &size);
 
@@ -684,10 +685,11 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
 static inline void create_debug_files (struct ohci_hcd *ohci)
 {
        struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev;
+       int retval;
 
-       class_device_create_file(cldev, &class_device_attr_async);
-       class_device_create_file(cldev, &class_device_attr_periodic);
-       class_device_create_file(cldev, &class_device_attr_registers);
+       retval = class_device_create_file(cldev, &class_device_attr_async);
+       retval = class_device_create_file(cldev, &class_device_attr_periodic);
+       retval = class_device_create_file(cldev, &class_device_attr_registers);
        ohci_dbg (ohci, "created debug files\n");
 }