From 95535c44ae9330982a75b0f69cef186f6901eac5 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 11 Jun 2007 02:28:21 -0700 Subject: [PATCH] musb_hdrc: Clean-up sysfs interface to show musb mode Clean-up sysfs interface to show musb mode Signed-off-by: Tony Lindgren --- drivers/usb/musb/plat_uds.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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; -- 2.41.1