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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent e326b30f
......@@ -36,8 +36,8 @@ struct wf_control_ops {
struct wf_control {
struct list_head link;
struct wf_control_ops *ops;
char *name;
const struct wf_control_ops *ops;
const char *name;
int type;
struct kref ref;
struct device_attribute attr;
......@@ -86,10 +86,11 @@ struct wf_sensor_ops {
struct wf_sensor {
struct list_head link;
struct wf_sensor_ops *ops;
char *name;
const struct wf_sensor_ops *ops;
const char *name;
struct kref ref;
struct device_attribute attr;
void *priv;
};
/* Same lifetime rules as controls */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment