aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-29 15:42:27 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-30 15:37:25 +1000
commit6cd3209967469f6e89d329deda6bb0b4700e7b62 (patch)
tree35f099b364bf811b44fa11c7d71eaa7b22d264a1 /drivers/macintosh/windfarm.h
parentpowerpc/windfarm: Add Fan Control Unit controls for G5s (diff)
downloadlinux-dev-6cd3209967469f6e89d329deda6bb0b4700e7b62.tar.xz
linux-dev-6cd3209967469f6e89d329deda6bb0b4700e7b62.zip
powerpc/powermac: New windfarm driver for PowerMac G5 (AGP) and Xserve G5
This replaces the old therm_pm72 using the same windfarm infrastructure that was used for other PowerMac G5 models. The fan speeds and sensors should now be visible in the same location in sysfs. The driver is split into separate core modules for PowerMac7,2 (and 7,3) and RackMac3,1, with a lot of the shared code now in the separate sensor and control modules. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/windfarm.h')
-rw-r--r--drivers/macintosh/windfarm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/macintosh/windfarm.h b/drivers/macintosh/windfarm.h
index a9e385ee359e..028cdac2d33d 100644
--- a/drivers/macintosh/windfarm.h
+++ b/drivers/macintosh/windfarm.h
@@ -17,7 +17,7 @@
#include <linux/device.h>
/* Display a 16.16 fixed point value */
-#define FIX32TOPRINT(f) ((f) >> 16),((((f) & 0xffff) * 1000) >> 16)
+#define FIX32TOPRINT(f) (((s32)(f)) >> 16),(((((s32)(f)) & 0xffff) * 1000) >> 16)
/*
* Control objects
@@ -41,6 +41,7 @@ struct wf_control {
int type;
struct kref ref;
struct device_attribute attr;
+ void *priv;
};
#define WF_CONTROL_TYPE_GENERIC 0