diff options
author | Yani Ioannou <yani.ioannou@gmail.com> | 2005-05-17 06:42:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:33 -0400 |
commit | a5099cfc2e82240b0a3e72ad79a5969d5af1a7dc (patch) | |
tree | aca3273e927a4d65f8f5fdf4cf5d8283969a3b43 /drivers/i2c/chips/pcf8591.c | |
parent | 8627f9ba531269d8850919c62af1b017438e2e79 (diff) |
[PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips/pcf8591.c')
-rw-r--r-- | drivers/i2c/chips/pcf8591.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c index b6b927d8b372..db812ade8564 100644 --- a/drivers/i2c/chips/pcf8591.c +++ b/drivers/i2c/chips/pcf8591.c | |||
@@ -100,7 +100,7 @@ static struct i2c_driver pcf8591_driver = { | |||
100 | 100 | ||
101 | /* following are the sysfs callback functions */ | 101 | /* following are the sysfs callback functions */ |
102 | #define show_in_channel(channel) \ | 102 | #define show_in_channel(channel) \ |
103 | static ssize_t show_in##channel##_input(struct device *dev, char *buf) \ | 103 | static ssize_t show_in##channel##_input(struct device *dev, struct device_attribute *attr, char *buf) \ |
104 | { \ | 104 | { \ |
105 | return sprintf(buf, "%d\n", pcf8591_read_channel(dev, channel));\ | 105 | return sprintf(buf, "%d\n", pcf8591_read_channel(dev, channel));\ |
106 | } \ | 106 | } \ |
@@ -112,13 +112,13 @@ show_in_channel(1); | |||
112 | show_in_channel(2); | 112 | show_in_channel(2); |
113 | show_in_channel(3); | 113 | show_in_channel(3); |
114 | 114 | ||
115 | static ssize_t show_out0_ouput(struct device *dev, char *buf) | 115 | static ssize_t show_out0_ouput(struct device *dev, struct device_attribute *attr, char *buf) |
116 | { | 116 | { |
117 | struct pcf8591_data *data = i2c_get_clientdata(to_i2c_client(dev)); | 117 | struct pcf8591_data *data = i2c_get_clientdata(to_i2c_client(dev)); |
118 | return sprintf(buf, "%d\n", data->aout * 10); | 118 | return sprintf(buf, "%d\n", data->aout * 10); |
119 | } | 119 | } |
120 | 120 | ||
121 | static ssize_t set_out0_output(struct device *dev, const char *buf, size_t count) | 121 | static ssize_t set_out0_output(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
122 | { | 122 | { |
123 | unsigned int value; | 123 | unsigned int value; |
124 | struct i2c_client *client = to_i2c_client(dev); | 124 | struct i2c_client *client = to_i2c_client(dev); |
@@ -134,13 +134,13 @@ static ssize_t set_out0_output(struct device *dev, const char *buf, size_t count | |||
134 | static DEVICE_ATTR(out0_output, S_IWUSR | S_IRUGO, | 134 | static DEVICE_ATTR(out0_output, S_IWUSR | S_IRUGO, |
135 | show_out0_ouput, set_out0_output); | 135 | show_out0_ouput, set_out0_output); |
136 | 136 | ||
137 | static ssize_t show_out0_enable(struct device *dev, char *buf) | 137 | static ssize_t show_out0_enable(struct device *dev, struct device_attribute *attr, char *buf) |
138 | { | 138 | { |
139 | struct pcf8591_data *data = i2c_get_clientdata(to_i2c_client(dev)); | 139 | struct pcf8591_data *data = i2c_get_clientdata(to_i2c_client(dev)); |
140 | return sprintf(buf, "%u\n", !(!(data->control & PCF8591_CONTROL_AOEF))); | 140 | return sprintf(buf, "%u\n", !(!(data->control & PCF8591_CONTROL_AOEF))); |
141 | } | 141 | } |
142 | 142 | ||
143 | static ssize_t set_out0_enable(struct device *dev, const char *buf, size_t count) | 143 | static ssize_t set_out0_enable(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
144 | { | 144 | { |
145 | struct i2c_client *client = to_i2c_client(dev); | 145 | struct i2c_client *client = to_i2c_client(dev); |
146 | struct pcf8591_data *data = i2c_get_clientdata(client); | 146 | struct pcf8591_data *data = i2c_get_clientdata(client); |