提交 b353a487 编写于 作者: J Jean Delvare 提交者: 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: NJean Delvare <khali@linux-fr.org>
Acked-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: NMark M. Hoffman <mhoffman@lightlink.com>
上级 1beeffe4
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册