aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-11-19 06:01:42 -0500
committerWolfram Sang <w.sang@pengutronix.de>2013-01-27 23:26:41 -0500
commitc81109332068b44db4fd7b650c0e6bc0fc1411f1 (patch)
tree4fca0d13ae02c67a0a52662198d4c744718f9ec9
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
i2c: core: Remove definition of i2c_smbus_process_call
i2c_smbus_process_call has no users in the kernel, so this can be removed. Documentation for the same has been updated accordingly. Fixes following sparse warning. drivers/i2c/i2c-core.c:1871:5: warning: symbol 'i2c_smbus_process_call' was not declared. Should it be static? [wsa: updated the documentation] Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
-rw-r--r--Documentation/i2c/smbus-protocol4
-rw-r--r--Documentation/i2c/writing-clients4
-rw-r--r--drivers/i2c/i2c-core.c23
3 files changed, 4 insertions, 27 deletions
diff --git a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol
index d1f22618e14b..6012b12b3510 100644
--- a/Documentation/i2c/smbus-protocol
+++ b/Documentation/i2c/smbus-protocol
@@ -137,8 +137,8 @@ available for writes where the two data bytes are the other way
137around (not SMBus compliant, but very popular.) 137around (not SMBus compliant, but very popular.)
138 138
139 139
140SMBus Process Call: i2c_smbus_process_call() 140SMBus Process Call:
141============================================= 141===================
142 142
143This command selects a device register (through the Comm byte), sends 143This command selects a device register (through the Comm byte), sends
14416 bits of data to it, and reads 16 bits of data in return. 14416 bits of data to it, and reads 16 bits of data in return.
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 3a94b0e6f601..6b344b516bff 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -365,8 +365,6 @@ in terms of it. Never use this function directly!
365 s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); 365 s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command);
366 s32 i2c_smbus_write_word_data(struct i2c_client *client, 366 s32 i2c_smbus_write_word_data(struct i2c_client *client,
367 u8 command, u16 value); 367 u8 command, u16 value);
368 s32 i2c_smbus_process_call(struct i2c_client *client,
369 u8 command, u16 value);
370 s32 i2c_smbus_read_block_data(struct i2c_client *client, 368 s32 i2c_smbus_read_block_data(struct i2c_client *client,
371 u8 command, u8 *values); 369 u8 command, u8 *values);
372 s32 i2c_smbus_write_block_data(struct i2c_client *client, 370 s32 i2c_smbus_write_block_data(struct i2c_client *client,
@@ -381,6 +379,8 @@ These ones were removed from i2c-core because they had no users, but could
381be added back later if needed: 379be added back later if needed:
382 380
383 s32 i2c_smbus_write_quick(struct i2c_client *client, u8 value); 381 s32 i2c_smbus_write_quick(struct i2c_client *client, u8 value);
382 s32 i2c_smbus_process_call(struct i2c_client *client,
383 u8 command, u16 value);
384 s32 i2c_smbus_block_process_call(struct i2c_client *client, 384 s32 i2c_smbus_block_process_call(struct i2c_client *client,
385 u8 command, u8 length, u8 *values); 385 u8 command, u8 length, u8 *values);
386 386
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e388590b44ab..66a30f7ac882 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1866,29 +1866,6 @@ s32 i2c_smbus_write_word_data(const struct i2c_client *client, u8 command,
1866EXPORT_SYMBOL(i2c_smbus_write_word_data); 1866EXPORT_SYMBOL(i2c_smbus_write_word_data);
1867 1867
1868/** 1868/**
1869 * i2c_smbus_process_call - SMBus "process call" protocol
1870 * @client: Handle to slave device
1871 * @command: Byte interpreted by slave
1872 * @value: 16-bit "word" being written
1873 *
1874 * This executes the SMBus "process call" protocol, returning negative errno
1875 * else a 16-bit unsigned "word" received from the device.
1876 */
1877s32 i2c_smbus_process_call(const struct i2c_client *client, u8 command,
1878 u16 value)
1879{
1880 union i2c_smbus_data data;
1881 int status;
1882 data.word = value;
1883
1884 status = i2c_smbus_xfer(client->adapter, client->addr, client->flags,
1885 I2C_SMBUS_WRITE, command,
1886 I2C_SMBUS_PROC_CALL, &data);
1887 return (status < 0) ? status : data.word;
1888}
1889EXPORT_SYMBOL(i2c_smbus_process_call);
1890
1891/**
1892 * i2c_smbus_read_block_data - SMBus "block read" protocol 1869 * i2c_smbus_read_block_data - SMBus "block read" protocol
1893 * @client: Handle to slave device 1870 * @client: Handle to slave device
1894 * @command: Byte interpreted by slave 1871 * @command: Byte interpreted by slave