From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Subject: Re: [PATCH] I2C fixes for 2.6.10-rc2
Date: Fri, 19 Nov 2004 14:00:30 -0800 [thread overview]
Message-ID: <20041119220030.GD15956@kroah.com> (raw)
In-Reply-To: <20041119220015.GC15956@kroah.com>
ChangeSet 1.2166, 2004/11/19 09:13:45-08:00, khali@linux-fr.org
[PATCH] I2C: Cleanups to the recent smbus functions removal
This patch cleans up the recent removal of smbus functions proposed by
Arjan and then fixed by Gabriel. Changes are as follow:
1* Discard i2c_smbus_block_process_call, as it isn't used anywhere
either. I guess that Arjan missed it because it wasn't exported.
2* Document the functions removal, so that people have at least an idea
that the functions can be restored later if needed.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Documentation/i2c/writing-clients | 20 ++++++++++++++++----
drivers/i2c/i2c-core.c | 19 -------------------
2 files changed, 16 insertions(+), 23 deletions(-)
diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
--- a/Documentation/i2c/writing-clients 2004-11-19 11:40:43 -08:00
+++ b/Documentation/i2c/writing-clients 2004-11-19 11:40:43 -08:00
@@ -676,13 +676,25 @@
extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);
extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
u8 command, u16 value);
- extern s32 i2c_smbus_process_call(struct i2c_client * client,
- u8 command, u16 value);
- extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
- u8 command, u8 *values);
extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
u8 command, u8 length,
u8 *values);
+
+These ones were removed in Linux 2.6.10 because they had no users, but could
+be added back later if needed:
+
+ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
+ u8 command, u8 *values);
+ extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
+ u8 command, u8 *values);
+ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
+ u8 command, u8 length,
+ u8 *values);
+ extern s32 i2c_smbus_process_call(struct i2c_client * client,
+ u8 command, u16 value);
+ extern s32 i2c_smbus_block_process_call(struct i2c_client *client,
+ u8 command, u8 length,
+ u8 *values)
All these transactions return -1 on failure. The 'write' transactions
return 0 on success; the 'read' transactions return the read value, except
diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c 2004-11-19 11:40:43 -08:00
+++ b/drivers/i2c/i2c-core.c 2004-11-19 11:40:43 -08:00
@@ -1038,25 +1038,6 @@
}
/* Returns the number of read bytes */
-s32 i2c_smbus_block_process_call(struct i2c_client *client, u8 command, u8 length, u8 *values)
-{
- union i2c_smbus_data data;
- int i;
- if (length > I2C_SMBUS_BLOCK_MAX - 1)
- return -1;
- data.block[0] = length;
- for (i = 1; i <= length; i++)
- data.block[i] = values[i-1];
- if(i2c_smbus_xfer(client->adapter,client->addr,client->flags,
- I2C_SMBUS_WRITE, command,
- I2C_SMBUS_BLOCK_PROC_CALL, &data))
- return -1;
- for (i = 1; i <= data.block[0]; i++)
- values[i-1] = data.block[i];
- return data.block[0];
-}
-
-/* Returns the number of read bytes */
s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *values)
{
union i2c_smbus_data data;
next prev parent reply other threads:[~2004-11-19 22:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-19 21:59 [BK PATCH] I2C fixes for 2.6.10-rc2 Greg KH
2004-11-19 22:00 ` [PATCH] " Greg KH
2004-11-19 22:00 ` Greg KH
2004-11-19 22:00 ` Greg KH [this message]
2004-11-19 22:00 ` Greg KH
2004-11-19 22:01 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2004-12-01 0:12 [BK PATCH] " Greg KH
2004-12-01 0:13 ` [PATCH] " Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
2004-12-01 0:13 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041119220030.GD15956@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox