From f900c2aefa3fe19080bced4736e0b642d7651dc8 Mon Sep 17 00:00:00 2001 From: Jiamin Ma Date: Thu, 26 Oct 2017 10:39:40 +0800 Subject: [PATCH] iomap: remove unnecessary comparison PD#152908: driver defect clean up #364 #365 #366 Change-Id: I53c4bd4cbe1cc82408ec3f0b30b3b8e696ea1fc2 Signed-off-by: Jiamin Ma --- drivers/amlogic/iomap/iomap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/iomap/iomap.c b/drivers/amlogic/iomap/iomap.c index 4680f171dc9bd5..64d138c0f348f9 100644 --- a/drivers/amlogic/iomap/iomap.c +++ b/drivers/amlogic/iomap/iomap.c @@ -41,7 +41,7 @@ void __iomem *meson_reg_map[IO_BUS_MAX]; int aml_reg_read(u32 bus_type, unsigned int reg, unsigned int *val) { - if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) { + if (bus_type < IO_BUS_MAX) { *val = readl((meson_reg_map[bus_type]+reg)); return 0; } else @@ -51,7 +51,7 @@ EXPORT_SYMBOL(aml_reg_read); int aml_reg_write(u32 bus_type, unsigned int reg, unsigned int val) { - if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) { + if (bus_type < IO_BUS_MAX) { writel(val, (meson_reg_map[bus_type]+reg)); return 0; } else @@ -63,7 +63,7 @@ int aml_regmap_update_bits(u32 bus_type, unsigned int reg, unsigned int mask, unsigned int val) { - if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) { + if (bus_type < IO_BUS_MAX) { unsigned int tmp, orig; aml_reg_read(bus_type, reg, &orig);