Skip to content

Commit

Permalink
USB: musb: we already tested for dyn_fifo
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 8573e6a commit ad517e9
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ad517e9

Please sign in to comment.