lkml.org 
[lkml]   [2011]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] usb: musb: trivial cleanup
    Date
    enabled && driver || !enabled can be simplified to !enabled || driver.

    Signed-off-by: Felipe Contreras <felipe.contreras@gmail.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


    \
     
     \ /
      Last update: 2011-12-16 00:07    [W:0.019 / U:7.708 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site