From 53be79593452e568a856f8393985131848d59b72 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 13 Oct 2007 23:56:32 +0200 Subject: i2c: Remove i2c_algorithm.algo_control() This removes: - An effectively unused hook: i2c_algorithm.algo_control. - The i2c_control() call, used only by i2c-dev to call that unused hook or set two barely supported adapter params. (That param setting moves into i2c-dev.c ... still iffy due to lack of locking, but no other changes.) As shown by diffstat, this is a net code shrink. It also reduces the complexity of the I2C adapter and /dev interfaces. Signed-off-by: David Brownell Signed-off-by: Jean Delvare --- drivers/i2c/i2c-core.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'drivers/i2c/i2c-core.c') diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5e58b5641a35..e73d58c43f38 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -931,28 +931,6 @@ int i2c_master_recv(struct i2c_client *client, char *buf ,int count) } EXPORT_SYMBOL(i2c_master_recv); -int i2c_control(struct i2c_client *client, - unsigned int cmd, unsigned long arg) -{ - int ret = 0; - struct i2c_adapter *adap = client->adapter; - - dev_dbg(&client->adapter->dev, "i2c ioctl, cmd: 0x%x, arg: %#lx\n", cmd, arg); - switch (cmd) { - case I2C_RETRIES: - adap->retries = arg; - break; - case I2C_TIMEOUT: - adap->timeout = arg; - break; - default: - if (adap->algo->algo_control!=NULL) - ret = adap->algo->algo_control(adap,cmd,arg); - } - return ret; -} -EXPORT_SYMBOL(i2c_control); - /* ---------------------------------------------------- * the i2c address scanning function * Will not work for 10-bit addresses! -- cgit v1.2.2