ds2782_battery: Get rid of magic numbers in driver_data
authorAnton Vorontsov <cbouatmailru@gmail.com>
Mon, 26 Apr 2010 18:10:52 +0000 (22:10 +0400)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Sun, 2 May 2010 19:41:53 +0000 (23:41 +0400)
commitab6cc8f9b716a3d0a41b42cd81d392183211a7f2
tree42d9c5144593690790656e55bf1405037ddeb32d
parent9b9ade6b612e562c4a5bd02ef38cc32e10f3f9ba
ds2782_battery: Get rid of magic numbers in driver_data

Constructions like 'if (id->driver_data == 1)' look quite weird.
This patch introduces 'enum ds278x_num_id', which makes things
much more understandable, i.e. 'if (id->driver_data == DS2786)'.

Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
drivers/power/ds2782_battery.c