USB: musb: we already tested for dyn_fifo
authorFelipe Balbi <felipe.balbi@nokia.com>
Thu, 21 Jan 2010 13:33:54 +0000 (15:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:54:39 +0000 (14:54 -0800)
... and even added a flag to struct musb, so let's
use that.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_core.c

index a6dc18cde27bf93b023a2933d7c40cdcd8731a8c..3e9b3b0e9c0d7e3e18eecb7ad6d9317bbe240ada 100644 (file)
@@ -1398,21 +1398,10 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
        musb->nr_endpoints = 1;
        musb->epmask = 1;
 
-       if (reg & MUSB_CONFIGDATA_DYNFIFO) {
-               if (musb->config->dyn_fifo)
-                       status = ep_config_from_table(musb);
-               else {
-                       ERR("reconfigure software for Dynamic FIFOs\n");
-                       status = -ENODEV;
-               }
-       } else {
-               if (!musb->config->dyn_fifo)
-                       status = ep_config_from_hw(musb);
-               else {
-                       ERR("reconfigure software for static FIFOs\n");
-                       return -ENODEV;
-               }
-       }
+       if (musb->dyn_fifo)
+               status = ep_config_from_table(musb);
+       else
+               status = ep_config_from_hw(musb);
 
        if (status < 0)
                return status;