Skip to content

Commit

Permalink
usb: musb: get rid of procfs entry
Browse files Browse the repository at this point in the history
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: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Aug 21, 2008
1 parent bf31338 commit 746cdd0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 864 deletions.
5 changes: 0 additions & 5 deletions drivers/usb/musb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ endif

ifneq ($(MUSB_DEBUG),0)
EXTRA_CFLAGS += -DDEBUG

ifeq ($(CONFIG_PROC_FS),y)
musb_hdrc-objs += musb_procfs.o
endif

endif

EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG)
21 changes: 11 additions & 10 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb->xceiv.state = OTG_STATE_A_IDLE;

status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
if (status)
goto fail;

DBG(1, "%s mode, status %d, devctl %02x %c\n",
"HOST", status,
Expand All @@ -2051,6 +2053,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb->xceiv.state = OTG_STATE_B_IDLE;

status = musb_gadget_setup(musb);
if (status)
goto fail;

DBG(1, "%s mode, status %d, dev%02x\n",
is_otg_enabled(musb) ? "OTG" : "PERIPHERAL",
Expand All @@ -2059,16 +2063,14 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)

}

if (status == 0)
musb_debug_create("driver/musb_hdrc", musb);
else {
return 0;

fail:
if (musb->clock)
clk_put(musb->clock);
device_init_wakeup(dev, 0);
musb_free(musb);
return status;
}
if (musb->clock)
clk_put(musb->clock);
device_init_wakeup(dev, 0);
musb_free(musb);
return status;

#ifdef CONFIG_SYSFS
status = device_create_file(dev, &dev_attr_mode);
Expand Down Expand Up @@ -2131,7 +2133,6 @@ static int __devexit musb_remove(struct platform_device *pdev)
* - OTG mode: both roles are deactivated (or never-activated)
*/
musb_shutdown(pdev);
musb_debug_delete("driver/musb_hdrc", musb);
#ifdef CONFIG_USB_MUSB_HDRC_HCD
if (musb->board_mode == MUSB_HOST)
usb_remove_hcd(musb_to_hcd(musb));
Expand Down
19 changes: 0 additions & 19 deletions drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 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__ */
Loading

0 comments on commit 746cdd0

Please sign in to comment.