]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ucd9000/ucd9200) Optimize array walk
authorJean Delvare <khali@linux-fr.org>
Wed, 31 Aug 2011 15:53:41 +0000 (11:53 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Tue, 6 Sep 2011 15:56:07 +0000 (08:56 -0700)
commit16f5a1fcb33b02f4480df8120b131e0bef2fde6e
tree17d7db505904c9cb57c79e586d31eb79376dd9b6
parent529c9a768a5b06b52e631cf8b978a5ff662632ce
hwmon: (ucd9000/ucd9200) Optimize array walk

Rewrite the loop walking the id array during probe. The new code is
better adapted to a null-terminated array, and is also clearer and
more efficient than the original.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Axel Lin <axel.lin@gmail.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/pmbus/ucd9000.c
drivers/hwmon/pmbus/ucd9200.c