]> asedeno.scripts.mit.edu Git - linux.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)
commit5630b4334c676ff60d9613e7b6a4cc89cb562acb
tree16a705e2b4a7279a58534c825c80d31b3c0bb97c
parent5d9e01b31dc06a466ef2d35620d93a6c9941b387
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