regulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros
In current implementation, the original macro implementation assumes the caller pass the parameter starting from 1 (to match the register names in datasheet). Thus we have unneeded plus one then minus one operations when using MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros. This patch removes these macros to avoid unneeded plus one then minus one operations without reducing readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
@@ -311,10 +311,6 @@ enum max8997_irq {
|
||||
MAX8997_IRQ_NR,
|
||||
};
|
||||
|
||||
#define MAX8997_REG_BUCK1DVS(x) (MAX8997_REG_BUCK1DVS1 + (x) - 1)
|
||||
#define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1)
|
||||
#define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1)
|
||||
|
||||
#define MAX8997_NUM_GPIO 12
|
||||
struct max8997_dev {
|
||||
struct device *dev;
|
||||
|
||||
Reference in New Issue
Block a user