diff options
author | Guenter Roeck <linux@roeck-us.net> | 2016-10-16 19:52:04 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2016-12-10 06:54:24 +0100 |
commit | 3a412d5e4a1c831723d0aaf305f1cf9a78ad9c90 (patch) | |
tree | ae1f9db72cf6eb4fd05de98c9ecc3f042da16001 /drivers/hwmon/tmp108.c | |
parent | hwmon: (core) Rename groups parameter in API to extra_groups (diff) | |
download | linux-3a412d5e4a1c831723d0aaf305f1cf9a78ad9c90.tar.xz linux-3a412d5e4a1c831723d0aaf305f1cf9a78ad9c90.zip |
hwmon: (core) Simplify sysfs attribute name allocation
Allocating the sysfs attribute name only if needed and only with the
required minimum length looks optimal, but does not take the additional
overhead for both devm_ data structures and the allocation header itself
into account. This also results in unnecessary memory fragmentation.
Move the sysfs name string into struct hwmon_device_attribute and give it
a sufficient length to reduce this overhead.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/tmp108.c')
0 files changed, 0 insertions, 0 deletions