drm/i915: Fix multiple off-by-one errors in intel_i2c
authorMarkus Pfeiffer <profmakx@dragonflybsd.org>
Sat, 9 Aug 2014 18:20:18 +0000 (19:20 +0100)
committerMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Thu, 14 Aug 2014 22:05:26 +0000 (22:05 +0000)
commit53f7629ea2c0330e5f047665cf977c63f2ee169d
treee1279a07d5fc4c08e7d8ceaab78543b252585c43
parentc77fb2a917c7af3dc7eed58d5b4534b030c60828
drm/i915: Fix multiple off-by-one errors in intel_i2c

* the i2c pin numbers are 1 based as per intel spec but
  we used the unit number as pin number, which is 0 based
* the gmbus array is 0 based, but the port number is 1 based
  accesses into the port array are therefore off-by-one and this
  only worked by chance before.
sys/dev/drm/i915/intel_i2c.c