bus: ti-sysc: Fix using configured sysc mask value
authorTony Lindgren <tony@atomide.com>
Mon, 22 Jul 2019 10:44:52 +0000 (03:44 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 24 Jul 2019 07:50:01 +0000 (00:50 -0700)
We have cases where there are no softreset bits like with am335x lcdc.
In that case ti,sysc-mask = <0> needs to be handled properly.

Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c

index 78fb52e..4963c77 100644 (file)
@@ -1692,10 +1692,7 @@ static int sysc_init_sysc_mask(struct sysc *ddata)
        if (error)
                return 0;
 
-       if (val)
-               ddata->cfg.sysc_val = val & ddata->cap->sysc_mask;
-       else
-               ddata->cfg.sysc_val = ddata->cap->sysc_mask;
+       ddata->cfg.sysc_val = val & ddata->cap->sysc_mask;
 
        return 0;
 }