aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/algos
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-08-13 17:32:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 18:38:50 -0400
commit3fd39687540bd5d0501f413c91461d3b9fcbb525 (patch)
tree6adc73fab509b926d8917ce01ee6516739efbfaa /drivers/i2c/algos
parentdefcb46ed4666095677c8f52904b9e328587a20d (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/i2c/algos')
-rw-r--r--drivers/i2c/algos/i2c-algo-sibyte.c31
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
122static int algo_control(struct i2c_adapter *adapter,
123 unsigned int cmd, unsigned long arg)
124{
125 return 0;
126}
127
128static u32 bit_func(struct i2c_adapter *adap) 122static 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
137static struct i2c_algorithm i2c_sibyte_algo = { 131static 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
180int i2c_sibyte_del_bus(struct i2c_adapter *adap) 173int 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
190int __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
197EXPORT_SYMBOL(i2c_sibyte_add_bus); 179EXPORT_SYMBOL(i2c_sibyte_add_bus);
198EXPORT_SYMBOL(i2c_sibyte_del_bus); 180EXPORT_SYMBOL(i2c_sibyte_del_bus);
199 181
200#ifdef MODULE
201MODULE_AUTHOR("Kip Walker, Broadcom Corp."); 182MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
202MODULE_DESCRIPTION("SiByte I2C-Bus algorithm"); 183MODULE_DESCRIPTION("SiByte I2C-Bus algorithm");
203module_param(bit_scan, int, 0); 184module_param(bit_scan, int, 0);
204MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); 185MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
205MODULE_LICENSE("GPL"); 186MODULE_LICENSE("GPL");
206
207int init_module(void)
208{
209 return i2c_algo_sibyte_init();
210}
211
212void cleanup_module(void)
213{
214}
215#endif