aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-10-13 17:56:32 -0400
committerJean Delvare <khali@hyperion.delvare>2007-10-13 17:56:32 -0400
commit53be79593452e568a856f8393985131848d59b72 (patch)
treeb1abe8a310486a6c0c146cdaf35f93e1f9faada3 /drivers/i2c/i2c-core.c
parentcdeec3cc79c7b1acfa89fb362b01e544ecfb285c (diff)
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 <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c22
1 files changed, 0 insertions, 22 deletions
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)
931} 931}
932EXPORT_SYMBOL(i2c_master_recv); 932EXPORT_SYMBOL(i2c_master_recv);
933 933
934int i2c_control(struct i2c_client *client,
935 unsigned int cmd, unsigned long arg)
936{
937 int ret = 0;
938 struct i2c_adapter *adap = client->adapter;
939
940 dev_dbg(&client->adapter->dev, "i2c ioctl, cmd: 0x%x, arg: %#lx\n", cmd, arg);
941 switch (cmd) {
942 case I2C_RETRIES:
943 adap->retries = arg;
944 break;
945 case I2C_TIMEOUT:
946 adap->timeout = arg;
947 break;
948 default:
949 if (adap->algo->algo_control!=NULL)
950 ret = adap->algo->algo_control(adap,cmd,arg);
951 }
952 return ret;
953}
954EXPORT_SYMBOL(i2c_control);
955
956/* ---------------------------------------------------- 934/* ----------------------------------------------------
957 * the i2c address scanning function 935 * the i2c address scanning function
958 * Will not work for 10-bit addresses! 936 * Will not work for 10-bit addresses!