diff options
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index e4e567e82b84..055a9c3a3b12 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -499,7 +499,6 @@ static int of_regmap_get_endian(struct device *dev, * From the DT node the endianness value maybe: * REGMAP_ENDIAN_BIG, * REGMAP_ENDIAN_LITTLE, - * REGMAP_ENDIAN_NATIVE, */ switch (type) { case REGMAP_ENDIAN_VAL: @@ -507,8 +506,10 @@ static int of_regmap_get_endian(struct device *dev, *endian = REGMAP_ENDIAN_BIG; else if (of_property_read_bool(np, "little-endian")) *endian = REGMAP_ENDIAN_LITTLE; - else - *endian = REGMAP_ENDIAN_NATIVE; + + if (*endian != REGMAP_ENDIAN_DEFAULT) + return 0; + break; case REGMAP_ENDIAN_REG: break; @@ -517,15 +518,6 @@ static int of_regmap_get_endian(struct device *dev, } /* - * If the endianness parsed from DT node is REGMAP_ENDIAN_NATIVE, that - * maybe means the DT does not care the endianness or it should use - * the regmap bus's default endianness, then we should try to check - * whether the regmap bus has specified the default endianness. - */ - if (*endian != REGMAP_ENDIAN_NATIVE) - return 0; - - /* * Finally, try to parse the endianness from regmap bus config * if in device's DT node the endianness property is absent. */ |