]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Clean-up sysfs interface to show musb mode
authorTony Lindgren <tony@atomide.com>
Mon, 11 Jun 2007 09:28:21 +0000 (02:28 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 11 Jun 2007 09:59:52 +0000 (02:59 -0700)
Clean-up sysfs interface to show musb mode

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/plat_uds.c

index 4fc8c43026d8310f39916173021c9f5f72cb8814..6c9efd51e7e3f76e29a6eeff8da6726fa2746edc 100644 (file)
@@ -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;