Florian Tobias Schandinat
ed2ee7b151
viafb: fix i2c_transfer error handling
...
commit 85c5702ac0 upstream.
i2c_transfer returns negative errno on error and number of messages
processed on success. Just returning this value would give a poor
interface as it is not obvious that you must compare with 2 after reading
1 or n bytes and with 1 after writing 1 byte to determine if it was
successful. To avoid this error prone interface convert the error code
of a successful read/write to zero and all other non-negative values to
an negative error code.
This fixes a regression introduced by
via: Rationalize vt1636 detection
which resulted in no longer detecting a VT1636 chip and therefore has
broken the output in configurations which contain this chip.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de >
Acked-by: Jonathan Corbet <corbet@lwn.net >
Cc: Joseph Chan <JosephChan@via.com.tw >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-12-09 13:32:15 -08:00
..
2010-07-21 09:25:42 -07:00
2010-07-19 10:56:54 +02:00
2010-09-22 17:22:39 -07:00
2010-03-30 22:02:32 +09:00
2010-06-29 15:29:31 -07:00
2010-03-30 22:02:32 +09:00
2010-05-25 08:07:09 -07:00
2007-10-16 09:43:17 -07:00
2009-06-16 19:47:57 -07:00
2010-08-20 09:34:54 -07:00
2010-08-06 09:25:50 -06:00
2010-03-30 22:02:32 +09:00
2010-07-29 13:54:53 -07:00
2010-03-30 22:02:32 +09:00
2010-07-05 16:31:39 +03:00
2010-08-08 10:02:59 -07:00
2010-03-30 22:02:32 +09:00
2010-03-16 19:47:54 +00:00
2010-03-30 22:02:32 +09:00
2010-09-22 17:22:39 -07:00
2010-03-30 22:02:32 +09:00
2010-12-09 13:32:15 -08:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-08-17 22:15:09 +01:00
2010-05-17 21:37:43 +02:00
2010-05-25 08:07:08 -07:00
2009-04-01 08:59:32 -07:00
2010-03-30 22:02:32 +09:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2010-03-30 22:02:32 +09:00
2007-05-04 17:59:05 -07:00
2010-03-30 22:02:32 +09:00
2010-07-26 19:08:15 +01:00
2006-12-08 08:29:06 -08:00
2010-03-30 22:02:32 +09:00
2006-03-27 08:44:55 -08:00
2010-05-27 09:12:42 -07:00
2010-05-25 08:07:08 -07:00
2010-05-27 09:12:42 -07:00
2010-03-12 15:52:34 -08:00
2010-08-06 09:25:50 -06:00
2009-01-12 20:56:31 +01:00
2009-01-12 20:56:31 +01:00
2009-01-12 20:56:32 +01:00
2009-01-12 20:56:32 +01:00
2008-07-24 10:47:34 -07:00
2010-06-16 18:05:05 +02:00
2008-07-24 10:47:34 -07:00
2010-03-30 22:02:32 +09:00
2009-05-06 16:36:10 -07:00
2008-04-28 08:58:42 -07:00
2010-08-06 09:25:50 -06:00
2010-08-06 09:25:50 -06:00
2010-08-06 09:25:50 -06:00
2010-03-30 22:02:32 +09:00
2010-05-17 21:37:41 +02:00
2009-12-16 07:20:04 -08:00
2010-05-03 15:42:58 +02:00
2010-08-01 01:42:42 -06:00
2010-07-30 23:29:33 +01:00
2006-06-30 19:25:36 +02:00
2010-05-25 08:07:09 -07:00
2010-03-30 22:02:32 +09:00
2010-09-22 17:22:39 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-06-04 15:21:45 -07:00
2009-05-06 16:36:10 -07:00
2006-07-31 13:28:44 -07:00
2007-10-16 09:43:17 -07:00
2009-02-05 12:56:46 -08:00
2010-03-30 22:02:32 +09:00
2010-08-11 08:59:12 -07:00
2010-03-30 22:02:32 +09:00
2010-05-18 16:19:27 +10:00
2010-08-06 09:25:50 -06:00
2010-05-17 21:37:41 +02:00
2010-08-06 09:25:50 -06:00
2010-03-30 22:02:32 +09:00
2010-07-26 19:08:13 +01:00
2009-01-06 15:59:26 -08:00
2010-03-30 22:02:32 +09:00
2010-05-25 08:07:08 -07:00
2010-05-25 08:07:09 -07:00
2010-03-30 22:02:32 +09:00
2010-08-11 08:59:12 -07:00
2010-03-30 22:02:32 +09:00
2010-08-10 22:10:51 +01:00
2010-08-05 13:26:17 +01:00
2010-08-11 09:13:19 -07:00
2010-08-06 09:25:50 -06:00
2010-02-27 18:31:16 +01:00
2010-02-27 18:31:14 +01:00
2007-07-17 10:23:13 -07:00
2010-08-06 18:13:19 +01:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-17 16:30:42 -07:00
2008-04-28 08:58:41 -07:00
2009-01-06 15:59:27 -08:00
2010-06-29 15:29:32 -07:00
2010-03-12 15:52:34 -08:00
2010-08-01 01:42:42 -06:00
2010-03-30 22:02:32 +09:00
2010-08-06 09:25:50 -06:00
2010-08-06 09:25:50 -06:00
2006-01-09 14:53:51 +11:00
2010-02-05 12:22:42 +01:00
2009-01-06 15:59:27 -08:00
2010-03-30 22:02:32 +09:00
2010-07-26 19:08:14 +01:00
2010-07-26 19:08:15 +01:00
2009-08-20 10:29:26 +10:00
2010-02-17 13:23:00 +09:00
2010-09-25 09:47:04 +08:00
2009-06-13 00:09:09 +08:00
2009-12-29 14:11:27 +08:00
2008-12-29 18:00:04 +08:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-25 08:07:09 -07:00
2009-06-16 19:47:59 -07:00
2010-08-11 08:59:12 -07:00
2010-05-27 09:12:42 -07:00
2010-03-07 17:04:50 -08:00
2009-04-13 15:04:29 -07:00
2008-05-08 21:37:30 -07:00
2008-05-08 21:37:30 -07:00
2010-05-25 08:07:09 -07:00
2010-03-30 22:02:32 +09:00
2010-08-04 16:12:11 +09:00
2010-08-04 16:12:15 +09:00
2010-08-04 16:12:15 +09:00
2009-04-13 15:04:29 -07:00
2010-02-09 11:13:56 +01:00
2010-03-30 22:02:32 +09:00
2008-07-26 12:00:12 -07:00
2009-12-04 15:39:55 +01:00
2010-04-05 11:37:28 +09:00
2010-08-06 09:25:50 -06:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2009-05-06 16:36:10 -07:00
2008-04-28 08:58:42 -07:00
2010-08-06 09:25:50 -06:00
2010-08-05 13:25:38 +01:00
2010-06-16 18:05:05 +02:00
2009-09-23 07:39:57 -07:00
2010-03-30 22:02:32 +09:00
2010-08-11 23:04:13 +09:30
2010-02-27 18:31:13 +01:00
2010-02-27 18:31:13 +01:00
2010-05-18 16:19:27 +10:00
2010-05-25 08:07:08 -07:00
2010-05-25 08:07:08 -07:00
2007-05-08 11:15:32 -07:00
2010-08-11 23:04:31 +09:30
2010-08-09 20:44:53 -07:00
2006-03-31 12:19:00 -08:00
2010-07-22 16:45:35 -07:00
2010-08-06 09:25:50 -06:00