i2c-piix4: Various cleanups and minor fixes
authorJean Delvare <khali@linux-fr.org>
Mon, 14 Jul 2008 20:38:25 +0000 (22:38 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Mon, 14 Jul 2008 20:38:25 +0000 (22:38 +0200)
commitfa63cd56d2f09806169307d761e8f430e23bc09b
tree71a6f64e1f3d4774c6c074646aab82961c1727e8
parent97140342e69d479a3ad82bfd4c154c0b08fe3eea
i2c-piix4: Various cleanups and minor fixes

The i2c-piix4 driver was used recently as a model to write a new SMBus
host controller driver and this made me realize that the code of this
old driver wasn't exactly good. So, here are many cleanups and minor
fixes to this driver, so that these minor mistakes aren't duplicated
again:

* Delete unused structure.
* Delete needless forward function declaration.
* Properly announce the SMBus host controller as we find it.
* Spell it SMBus not SMB.
* Return -EBUSY instead of -ENODEV when the I/O region is already in
  use.
* Drop useless masks on the 7-bit address and the R/W bit.
* Reject block transaction requests with an invalid block length.
* Check and report block transaction replies with an invalid block
  length.
* Delete a useless comment.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-piix4.c