Commit 95535c44 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Clean-up sysfs interface to show musb mode

Clean-up sysfs interface to show musb mode
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent dae1dca1
...@@ -1497,17 +1497,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) ...@@ -1497,17 +1497,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
int ret = -EINVAL; int ret = -EINVAL;
spin_lock_irqsave(&musb->Lock, flags); spin_lock_irqsave(&musb->Lock, flags);
switch (musb->board_mode) { ret = sprintf(buf, "%s\n", otg_state_string(musb));
case MUSB_HOST:
ret = sprintf(buf, "host\n");
break;
case MUSB_PERIPHERAL:
ret = sprintf(buf, "peripheral\n");
break;
case MUSB_OTG:
ret = sprintf(buf, "otg\n");
break;
}
spin_unlock_irqrestore(&musb->Lock, flags); spin_unlock_irqrestore(&musb->Lock, flags);
return ret; return ret;
......
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