From: Tony Lindgren Date: Mon, 11 Jun 2007 09:28:21 +0000 (-0700) Subject: musb_hdrc: Clean-up sysfs interface to show musb mode X-Git-Tag: v2.6.22-omap1~53 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=95535c44ae9330982a75b0f69cef186f6901eac5;p=linux-2.6-omap-h63xx.git musb_hdrc: Clean-up sysfs interface to show musb mode Clean-up sysfs interface to show musb mode Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 4fc8c43026d..6c9efd51e7e 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -1497,17 +1497,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) int ret = -EINVAL; spin_lock_irqsave(&musb->Lock, flags); - switch (musb->board_mode) { - 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; - } + ret = sprintf(buf, "%s\n", otg_state_string(musb)); spin_unlock_irqrestore(&musb->Lock, flags); return ret;