diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-08-13 17:32:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 18:38:50 -0400 |
commit | 3fd39687540bd5d0501f413c91461d3b9fcbb525 (patch) | |
tree | 6adc73fab509b926d8917ce01ee6516739efbfaa /drivers | |
parent | defcb46ed4666095677c8f52904b9e328587a20d (diff) |
i2c-algo-sibyte: Cleanups
i2c-algo-sibyte: Cleanups
* Delete empty algo_control implementation.
* Simplify i2c_sibyte_del_bus.
* Delete empty module init and cleanup functions.
* Drop out-of-date #ifdef MODULE construct.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-sibyte.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/drivers/i2c/algos/i2c-algo-sibyte.c b/drivers/i2c/algos/i2c-algo-sibyte.c index 32d41c6fac0f..16d666fa16f3 100644 --- a/drivers/i2c/algos/i2c-algo-sibyte.c +++ b/drivers/i2c/algos/i2c-algo-sibyte.c | |||
@@ -119,12 +119,6 @@ static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | static int algo_control(struct i2c_adapter *adapter, | ||
123 | unsigned int cmd, unsigned long arg) | ||
124 | { | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static u32 bit_func(struct i2c_adapter *adap) | 122 | static u32 bit_func(struct i2c_adapter *adap) |
129 | { | 123 | { |
130 | return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | | 124 | return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | |
@@ -136,7 +130,6 @@ static u32 bit_func(struct i2c_adapter *adap) | |||
136 | 130 | ||
137 | static struct i2c_algorithm i2c_sibyte_algo = { | 131 | static struct i2c_algorithm i2c_sibyte_algo = { |
138 | .smbus_xfer = smbus_xfer, | 132 | .smbus_xfer = smbus_xfer, |
139 | .algo_control = algo_control, /* ioctl */ | ||
140 | .functionality = bit_func, | 133 | .functionality = bit_func, |
141 | }; | 134 | }; |
142 | 135 | ||
@@ -179,37 +172,15 @@ int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) | |||
179 | 172 | ||
180 | int i2c_sibyte_del_bus(struct i2c_adapter *adap) | 173 | int i2c_sibyte_del_bus(struct i2c_adapter *adap) |
181 | { | 174 | { |
182 | int res; | 175 | return i2c_del_adapter(adap); |
183 | |||
184 | if ((res = i2c_del_adapter(adap)) < 0) | ||
185 | return res; | ||
186 | |||
187 | return 0; | ||
188 | } | ||
189 | |||
190 | int __init i2c_algo_sibyte_init (void) | ||
191 | { | ||
192 | printk("i2c-algo-sibyte.o: i2c SiByte algorithm module\n"); | ||
193 | return 0; | ||
194 | } | 176 | } |
195 | 177 | ||
196 | 178 | ||
197 | EXPORT_SYMBOL(i2c_sibyte_add_bus); | 179 | EXPORT_SYMBOL(i2c_sibyte_add_bus); |
198 | EXPORT_SYMBOL(i2c_sibyte_del_bus); | 180 | EXPORT_SYMBOL(i2c_sibyte_del_bus); |
199 | 181 | ||
200 | #ifdef MODULE | ||
201 | MODULE_AUTHOR("Kip Walker, Broadcom Corp."); | 182 | MODULE_AUTHOR("Kip Walker, Broadcom Corp."); |
202 | MODULE_DESCRIPTION("SiByte I2C-Bus algorithm"); | 183 | MODULE_DESCRIPTION("SiByte I2C-Bus algorithm"); |
203 | module_param(bit_scan, int, 0); | 184 | module_param(bit_scan, int, 0); |
204 | MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); | 185 | MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); |
205 | MODULE_LICENSE("GPL"); | 186 | MODULE_LICENSE("GPL"); |
206 | |||
207 | int init_module(void) | ||
208 | { | ||
209 | return i2c_algo_sibyte_init(); | ||
210 | } | ||
211 | |||
212 | void cleanup_module(void) | ||
213 | { | ||
214 | } | ||
215 | #endif | ||