Commit 746cdd0b authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman

usb: musb: get rid of procfs entry

Drivers should not add procfs. The functionality in the old
procfs file will be moved to debugfs.

Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bf31338b
...@@ -76,11 +76,6 @@ endif ...@@ -76,11 +76,6 @@ endif
ifneq ($(MUSB_DEBUG),0) ifneq ($(MUSB_DEBUG),0)
EXTRA_CFLAGS += -DDEBUG EXTRA_CFLAGS += -DDEBUG
ifeq ($(CONFIG_PROC_FS),y)
musb_hdrc-objs += musb_procfs.o
endif
endif endif
EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG) EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG)
...@@ -2037,6 +2037,8 @@ bad_config: ...@@ -2037,6 +2037,8 @@ bad_config:
musb->xceiv.state = OTG_STATE_A_IDLE; musb->xceiv.state = OTG_STATE_A_IDLE;
status = usb_add_hcd(musb_to_hcd(musb), -1, 0); status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
if (status)
goto fail;
DBG(1, "%s mode, status %d, devctl %02x %c\n", DBG(1, "%s mode, status %d, devctl %02x %c\n",
"HOST", status, "HOST", status,
...@@ -2051,6 +2053,8 @@ bad_config: ...@@ -2051,6 +2053,8 @@ bad_config:
musb->xceiv.state = OTG_STATE_B_IDLE; musb->xceiv.state = OTG_STATE_B_IDLE;
status = musb_gadget_setup(musb); status = musb_gadget_setup(musb);
if (status)
goto fail;
DBG(1, "%s mode, status %d, dev%02x\n", DBG(1, "%s mode, status %d, dev%02x\n",
is_otg_enabled(musb) ? "OTG" : "PERIPHERAL", is_otg_enabled(musb) ? "OTG" : "PERIPHERAL",
...@@ -2059,16 +2063,14 @@ bad_config: ...@@ -2059,16 +2063,14 @@ bad_config:
} }
if (status == 0) return 0;
musb_debug_create("driver/musb_hdrc", musb);
else {
fail: fail:
if (musb->clock) if (musb->clock)
clk_put(musb->clock); clk_put(musb->clock);
device_init_wakeup(dev, 0); device_init_wakeup(dev, 0);
musb_free(musb); musb_free(musb);
return status; return status;
}
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode); status = device_create_file(dev, &dev_attr_mode);
...@@ -2131,7 +2133,6 @@ static int __devexit musb_remove(struct platform_device *pdev) ...@@ -2131,7 +2133,6 @@ static int __devexit musb_remove(struct platform_device *pdev)
* - OTG mode: both roles are deactivated (or never-activated) * - OTG mode: both roles are deactivated (or never-activated)
*/ */
musb_shutdown(pdev); musb_shutdown(pdev);
musb_debug_delete("driver/musb_hdrc", musb);
#ifdef CONFIG_USB_MUSB_HDRC_HCD #ifdef CONFIG_USB_MUSB_HDRC_HCD
if (musb->board_mode == MUSB_HOST) if (musb->board_mode == MUSB_HOST)
usb_remove_hcd(musb_to_hcd(musb)); usb_remove_hcd(musb_to_hcd(musb));
......
...@@ -485,23 +485,4 @@ extern int musb_platform_get_vbus_status(struct musb *musb); ...@@ -485,23 +485,4 @@ extern int musb_platform_get_vbus_status(struct musb *musb);
extern int __init musb_platform_init(struct musb *musb); extern int __init musb_platform_init(struct musb *musb);
extern int musb_platform_exit(struct musb *musb); extern int musb_platform_exit(struct musb *musb);
/*-------------------------- ProcFS definitions ---------------------*/
struct proc_dir_entry;
#if (MUSB_DEBUG > 0) && defined(MUSB_CONFIG_PROC_FS)
extern struct proc_dir_entry *musb_debug_create(char *name, struct musb *data);
extern void musb_debug_delete(char *name, struct musb *data);
#else
static inline struct proc_dir_entry *
musb_debug_create(char *name, struct musb *data)
{
return NULL;
}
static inline void musb_debug_delete(char *name, struct musb *data)
{
}
#endif
#endif /* __MUSB_CORE_H__ */ #endif /* __MUSB_CORE_H__ */
This diff is collapsed.
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