Skip to content

Commit

Permalink
usb: musb: trivial cleanup
Browse files Browse the repository at this point in the history
enabled && driver || !enabled can be simplified to !enabled || driver.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Contreras authored and Felipe Balbi committed Dec 20, 2011
1 parent 772aed4 commit b3314d9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,7 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
case USB_EVENT_ID:
dev_dbg(musb->controller, "ID GND\n");

if (is_otg_enabled(musb)) {
if (musb->gadget_driver) {
pm_runtime_get_sync(musb->controller);
otg_init(musb->xceiv);
omap2430_musb_set_vbus(musb, 1);
}
} else {
if (!is_otg_enabled(musb) || musb->gadget_driver) {
pm_runtime_get_sync(musb->controller);
otg_init(musb->xceiv);
omap2430_musb_set_vbus(musb, 1);
Expand Down

0 comments on commit b3314d9

Please sign in to comment.