]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hwmon: (ibmaem) Avoid repeated memory allocations
authorJean Delvare <khali@linux-fr.org>
Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)
committerJean Delvare <khali@endymion.delvare>
Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)
commitda8ebe4e09ee5661f125a8401ade58baf226aa57
treea336300b6568c72455c85eef4024630b2735cc57
parent9d84c9e8b5b0386ee1d7769de0ff8a2546a2d054
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