diff options
author | David Brownell <david-b@pacbell.net> | 2008-07-14 16:38:23 -0400 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-07-14 16:38:23 -0400 |
commit | 24a5bb7b1838dc4524dd353224e2aa09c22cac3b (patch) | |
tree | 8e7c7bb65b889e20d7a1067d41157b4b150cf045 /Documentation/i2c/writing-clients | |
parent | 75415490d6adc1aecbf0cade0785b007957d0cfe (diff) |
i2c-core: Return -Errno, not -1
More updates to the I2C stack's fault reporting: make the core stop
returning "-1" (usually "-EPERM") for all faults. Instead, pass lower
level fault code up the stack, or return some appropriate errno.
This patch happens to touch almost exclusively SMBus calls.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'Documentation/i2c/writing-clients')
-rw-r--r-- | Documentation/i2c/writing-clients | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index d4cd4126d1ad..ba5d1971f35f 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -598,10 +598,10 @@ be added back later if needed: | |||
598 | u8 command, u8 length, | 598 | u8 command, u8 length, |
599 | u8 *values) | 599 | u8 *values) |
600 | 600 | ||
601 | All these transactions return -1 on failure. The 'write' transactions | 601 | All these transactions return a negative errno value on failure. The 'write' |
602 | return 0 on success; the 'read' transactions return the read value, except | 602 | transactions return 0 on success; the 'read' transactions return the read |
603 | for read_block, which returns the number of values read. The block buffers | 603 | value, except for block transactions, which return the number of values |
604 | need not be longer than 32 bytes. | 604 | read. The block buffers need not be longer than 32 bytes. |
605 | 605 | ||
606 | You can read the file `smbus-protocol' for more information about the | 606 | You can read the file `smbus-protocol' for more information about the |
607 | actual SMBus protocol. | 607 | actual SMBus protocol. |