Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1' undeclared (first use in this function)

From: David Brownell (david-b@pacbell.net)
Date: Thu Jan 02 2003 - 19:39:57 EST


The attached patch just reverts the "always provide sysfs debug files"
part of Greg's patch. Gets rid of that compile error as well as
keeping the driver object size smaller.

If we want to have debug files without CONFIG_USB_DEBUG, I'd rather
have them controlled by some other Kconfig option.

- Dave


--- ./drivers/usb-dist/host/ohci-dbg.c Thu Jan 2 13:18:42 2003
+++ ./drivers/usb/host/ohci-dbg.c Thu Jan 2 15:04:38 2003
@@ -318,6 +318,10 @@
         }
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,32)
+# define DRIVERFS_DEBUG_FILES
+#endif
+
 #else
 static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
 
@@ -325,6 +329,8 @@
 
 /*-------------------------------------------------------------------------*/
 
+#ifdef DRIVERFS_DEBUG_FILES
+
 static ssize_t
 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
 {
@@ -522,5 +528,12 @@
         device_remove_file (bus->hcd.controller, &dev_attr_periodic);
 }
 
+#else /* empty stubs for creating those files */
+
+static inline void create_debug_files (struct ohci_hcd *bus) { }
+static inline void remove_debug_files (struct ohci_hcd *bus) { }
+
+#endif /* DRIVERFS_DEBUG_FILES */
+
 /*-------------------------------------------------------------------------*/
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:19 EST