[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1323990310-11905-3-git-send-email-felipe.contreras@gmail.com>
Date: Fri, 16 Dec 2011 01:05:09 +0200
From: Felipe Contreras <felipe.contreras@...il.com>
To: linux-usb@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Jiri Kosina <trivial@...nel.org>,
Felipe Contreras <felipe.contreras@...il.com>
Subject: [PATCH 2/3] usb: musb: trivial cleanup
enabled && driver || !enabled can be simplified to !enabled || driver.
Signed-off-by: Felipe Contreras <felipe.contreras@...il.com>
---
drivers/usb/musb/omap2430.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 4edfb91..a615538 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -236,13 +236,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
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);
--
1.7.8.rc1.14.g248db
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists