]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:18:23 +0000 (07:18 +0200)
[ Upstream commit e212abd452a4af3174fcd469d46656f83e135a19 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c

index f5176a5d38cd960e23051be0e11738703be7d34c..56a2399f341e81cbdd9ba35e37494fc6f4df5a6f 100644 (file)
@@ -1388,10 +1388,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;
 }