]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ibmaem) Avoid repeated memory allocations
authorJean Delvare <khali@linux-fr.org>
Tue, 30 Aug 2011 01:16:55 +0000 (11:16 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 30 Aug 2011 01:16:55 +0000 (11:16 +1000)
commit2ffebecacd16ee186fb44005bd3349a3528f171b
treef7bd662cbf2a07ff4915a8c68844db608c915f04
parent224d864660873f900ab2346fa51ddb927227c380
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