]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i2c: rcar: tidyup priv->devtype handling on rcar_i2c_probe()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 9 Sep 2024 04:42:45 +0000 (04:42 +0000)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 9 Sep 2024 22:36:49 +0000 (00:36 +0200)
commit1bae7589228fd942d8133c0a8660078ba421203d
tree5585d91235e3faea4ebd3668948d26f69b790faf
parentc9e8f5a553d05fcbb2bfa7635581ebcbcd2b234a
i2c: rcar: tidyup priv->devtype handling on rcar_i2c_probe()

rcar_i2c_probe() has priv->devtype operation, but handling (A) and (C)
in same place is more understandable ( (A) and (B) are independent).

(A) if (priv->devtype < I2C_RCAR_GEN3) {
...
}

(B) ...

(C) if (priv->devtype >= I2C_RCAR_GEN3) {
...
}

Let's merge it with if-else

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-rcar.c