]> Git Repo - J-linux.git/commitdiff
bus: ti-sysc: Fix dispc quirk masking bool variables
authorTony Lindgren <[email protected]>
Wed, 17 May 2023 07:04:16 +0000 (10:04 +0300)
committerTony Lindgren <[email protected]>
Wed, 17 May 2023 07:17:01 +0000 (10:17 +0300)
Fix warning drivers/bus/ti-sysc.c:1806 sysc_quirk_dispc()
warn: masking a bool.

While at it let's add a comment for what were doing to make
the code a bit easier to follow.

Fixes: 7324a7a0d5e2 ("bus: ti-sysc: Implement display subsystem reset quirk")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/linux-omap/[email protected]/
Signed-off-by: Tony Lindgren <[email protected]>
drivers/bus/ti-sysc.c

index 6c49de37d5e90f98cf63b2875bbe3d3ed18c8b76..21fe9854703f9e1b9593e700ce3f4bc756e7fbdb 100644 (file)
@@ -1791,7 +1791,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
        if (!ddata->module_va)
                return -EIO;
 
-       /* DISP_CONTROL */
+       /* DISP_CONTROL, shut down lcd and digit on disable if enabled */
        val = sysc_read(ddata, dispc_offset + 0x40);
        lcd_en = val & lcd_en_mask;
        digit_en = val & digit_en_mask;
@@ -1803,7 +1803,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
                else
                        irq_mask |= BIT(2) | BIT(3);    /* EVSYNC bits */
        }
-       if (disable & (lcd_en | digit_en))
+       if (disable && (lcd_en || digit_en))
                sysc_write(ddata, dispc_offset + 0x40,
                           val & ~(lcd_en_mask | digit_en_mask));
 
This page took 0.057909 seconds and 4 git commands to generate.