]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
USB: ohci-pnx4008: I2C cleanups and fixes
authorJean Delvare <khali@linux-fr.org>
Wed, 18 Jun 2008 12:46:27 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:16:38 +0000 (15:16 -0700)
commit64b3d6d11948cc71ff12124dcb693392a32f1bf4
treed13757608f2bc1ad90ce7bfa99784546c499225e
parent71be4f81e97fe1f42c48a6dfc411dc6d3c18687f
USB: ohci-pnx4008: I2C cleanups and fixes

Various cleanups and fixes to the i2c code in ohci-pnx4008:
* Delete empty isp1301_command. The i2c driver command implementation
  is optional, so there's no point in providing an empty
  implementation.
* Give a name to isp1301_driver. I'm surprised that i2c-core accepted
  to register this driver at all. I've chosen "isp1301_pnx" as the
  name, because it's not a generic ISP1301 driver (much like the
  isp1301_omap driver.) We might want to make the name even more
  specific (but "isp1301_ohci_pnx4008" doesn't fit.)
* The ISP1301 is definitely not a hardware monitoring device.
* Fix a memory leak on failure in isp1301_attach. If
  i2c_attach_client fails, the client is not registered so
  isp1301_detach is never called and the i2c_client memory is lost.
* Use strlcpy instead of strcpy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ohci-pnx4008.c