]> git.baikalelectronics.ru Git - kernel.git/commit
power_supply: bq27xxx_battery: Index register numbers by enum
authorAndrew F. Davis <afd@ti.com>
Tue, 31 May 2016 18:44:59 +0000 (13:44 -0500)
committerSebastian Reichel <sre@kernel.org>
Fri, 10 Jun 2016 00:45:12 +0000 (02:45 +0200)
commit75a8801125dd5883a2da85ed06835a72f6d14fb6
tree16a705e2b4a7279a58534c825c80d31b3c0bb97c
parent9c8843e35ab5a1d4601afaf878afec946072ef81
power_supply: bq27xxx_battery: Index register numbers by enum

Currently we use tables to map from register function to register number,
these tables assume the enum used to describe the register function
and index the register number is ordered to match the enum order. Index
the register numbers by the enum instead. This also removes the need
to comment each value with its function.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq27xxx_battery.c