diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-18 22:16:47 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-30 15:37:19 +1000 |
commit | e074d08e2b98db1b19328bb9395052b34366831d (patch) | |
tree | 113e1938321b9d98e1d8ea97fb2fbc34408d1177 /drivers/macintosh | |
parent | e326b30fda9a985a2e7fda6fb9212b86bf025c39 (diff) | |
download | linux-stable-e074d08e2b98db1b19328bb9395052b34366831d.tar.gz linux-stable-e074d08e2b98db1b19328bb9395052b34366831d.tar.bz2 linux-stable-e074d08e2b98db1b19328bb9395052b34366831d.zip |
powerpc/windfarm: const'ify and add "priv" field to controls & sensors
const'ify the sensor ops and name and add a void* for use by
the control and sensor drivers to point back to their private
data, avoiding the need to create a wrapper data structure
per sensor or control instance.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/windfarm.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/macintosh/windfarm.h b/drivers/macintosh/windfarm.h index 7a2482cc26a7..3ef192a1fca0 100644 --- a/drivers/macintosh/windfarm.h +++ b/drivers/macintosh/windfarm.h @@ -35,12 +35,12 @@ struct wf_control_ops { }; struct wf_control { - struct list_head link; - struct wf_control_ops *ops; - char *name; - int type; - struct kref ref; - struct device_attribute attr; + struct list_head link; + const struct wf_control_ops *ops; + const char *name; + int type; + struct kref ref; + struct device_attribute attr; }; #define WF_CONTROL_TYPE_GENERIC 0 @@ -85,11 +85,12 @@ struct wf_sensor_ops { }; struct wf_sensor { - struct list_head link; - struct wf_sensor_ops *ops; - char *name; - struct kref ref; - struct device_attribute attr; + struct list_head link; + const struct wf_sensor_ops *ops; + const char *name; + struct kref ref; + struct device_attribute attr; + void *priv; }; /* Same lifetime rules as controls */ |