Commit 2d651289 authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Greg Kroah-Hartman

usb: chipidea: convert debug entries in sysfs to debugfs

Currently, we have a bunch of files in sysfs that display all sorts of
debugging information for the device controller, so they have to move to
debugfs where they belong. The "registers" interface have been removed,
since it doesn't fit into the current driver design as is and it's hardly
a good idea to touch the registers from userspace anyway.
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69b7e8d3
......@@ -129,6 +129,7 @@ struct hw_bank {
* @vbus_active: is VBUS active
* @transceiver: pointer to USB PHY, if any
* @hcd: pointer to usb_hcd for ehci host driver
* @debugfs: root dentry for this controller in debugfs
*/
struct ci13xxx {
struct device *dev;
......@@ -164,6 +165,7 @@ struct ci13xxx {
bool global_phy;
struct usb_phy *transceiver;
struct usb_hcd *hcd;
struct dentry *debugfs;
};
static inline struct ci_role_driver *ci_role(struct ci13xxx *ci)
......
This diff is collapsed.
......@@ -14,17 +14,16 @@
#define __DRIVERS_USB_CHIPIDEA_DEBUG_H
#ifdef CONFIG_USB_CHIPIDEA_DEBUG
int dbg_create_files(struct device *dev);
int dbg_remove_files(struct device *dev);
int dbg_create_files(struct ci13xxx *ci);
void dbg_remove_files(struct ci13xxx *ci);
#else
static inline int dbg_create_files(struct device *dev)
static inline int dbg_create_files(struct ci13xxx *ci)
{
return 0;
}
static inline int dbg_remove_files(struct device *dev)
static inline void dbg_remove_files(struct ci13xxx *ci)
{
return 0;
}
#endif
......
......@@ -1697,7 +1697,7 @@ static int udc_start(struct ci13xxx *ci)
goto put_transceiver;
}
retval = dbg_create_files(ci->dev);
retval = dbg_create_files(ci);
if (retval)
goto unreg_device;
......@@ -1726,7 +1726,7 @@ static int udc_start(struct ci13xxx *ci)
dev_err(dev, "error = %i\n", retval);
remove_dbg:
dbg_remove_files(ci->dev);
dbg_remove_files(ci);
unreg_device:
device_unregister(&ci->gadget.dev);
put_transceiver:
......@@ -1763,7 +1763,7 @@ static void udc_stop(struct ci13xxx *ci)
if (ci->global_phy)
usb_put_phy(ci->transceiver);
}
dbg_remove_files(ci->dev);
dbg_remove_files(ci);
device_unregister(&ci->gadget.dev);
/* my kobject is dynamic, I swear! */
memset(&ci->gadget, 0, sizeof(ci->gadget));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment