From b353a487b9d835da331edb443afedfd7977b3d76 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 5 Jul 2007 20:36:12 +0200 Subject: [PATCH] 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-format-patch failed