Commit b353a487 authored by Jean Delvare's avatar Jean Delvare Committed by Mark M. Hoffman

hwmon: (lm85) Use dynamic sysfs callbacks

This lets us get rid of macro-generated functions and shrinks the
driver size by about 10%. I used a new style suggested by Mark M.
Hoffman to retrieve the channel number. Instead of:

	struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
	int nr = sda->index;

I do:

	int nr = to_sensor_dev_attr(attr)->index;

This looks better, and even allows the compiler to do some minor
optimizations.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent 1beeffe4
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment