]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ibmaem) Avoid repeated memory allocations
authorJean Delvare <khali@linux-fr.org>
Wed, 24 Aug 2011 01:19:41 +0000 (11:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 24 Aug 2011 01:19:41 +0000 (11:19 +1000)
commita47980cdee33cab3f02b372671245b843c8bdafd
tree5565723c64afae653329aa54512ad7649100131c
parent1ac57e2a3f9c429ad9e5ebd5dd886a6b68104a6a
hwmon: (ibmaem) Avoid repeated memory allocations

Preallocate a buffer for the response to sensor reads, and reuse it
for each read instead of allocating a new one each time. This should
be faster and should also avoid memory fragmentation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/ibmaem.c