From: Jean Delvare Date: Thu, 5 Jul 2007 18:36:12 +0000 (+0200) Subject: hwmon: (lm85) Use dynamic sysfs callbacks X-Git-Tag: v2.6.24-rc1~1299^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b353a487b9d835da331edb443afedfd7977b3d76;p=pandora-kernel.git 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: Jean Delvare Acked-by: Krzysztof Helt Signed-off-by: Mark M. Hoffman --- Reading git-diff-tree failed