Re: 2.5.54 -- ohci-dbg.c: 358: In function `show_list': `data1'

David Brownell (david-b@pacbell.net)
Thu, 02 Jan 2003 16:39:57 -0800


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-1007-1041554263-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--=_courier-1007-1041554263-0001-2
Content-Type: text/plain; name="ohci-0102.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-disposition: inline; filename=ohci-0102.patch

--- ./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 */
+
/*-------------------------------------------------------------------------*/

--=_courier-1007-1041554263-0001-2--