]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
phy: renesas: rcar-gen3-usb2: Remove redundant ternary operators
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Thu, 28 Aug 2025 12:23:56 +0000 (20:23 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 1 Sep 2025 12:43:54 +0000 (18:13 +0530)
Remove redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250828122401.17441-3-liaoyuanhong@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/renesas/phy-rcar-gen3-usb2.c

index 7b4a6e8b7508f0f100348cdbb31a663fbf01b0fa..bab2d4dce5b3a08e0f0177c721fe3d36492632a6 100644 (file)
@@ -306,7 +306,7 @@ static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch)
        }
 
        if (!ch->uses_otg_pins)
-               return (ch->dr_mode == USB_DR_MODE_HOST) ? false : true;
+               return ch->dr_mode != USB_DR_MODE_HOST;
 
        if (ch->phy_data->no_adp_ctrl)
                return !!(readl(ch->base + USB2_LINECTRL1) & USB2_LINECTRL1_USB2_IDMON);