diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2007-06-08 18:46:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:02:10 -0400 |
commit | 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (patch) | |
tree | 6e16d3ec80c87490dc743f72da086356f2906ace /drivers/i2c/busses | |
parent | b8a3a5214d7cc115f1ca3a3967b7229d97c46f4a (diff) |
PCI: Change all drivers to use pci_device->revision
Instead of all drivers reading pci config space to get the revision
ID, they can now use the pci_device->revision member.
This exposes some issues where drivers where reading a word or a dword
for the revision number, and adding useless error-handling around the
read. Some drivers even just read it for no purpose of all.
In devices where the revision ID is being copied over and used in what
appears to be the equivalent of hotpath, I have left the copy code
and the cached copy as not to influence the driver's performance.
Compile tested with make all{yes,mod}config on x86_64 and i386.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-viapro.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 7a2bc06304fc..1d76b9e5207a 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -397,8 +397,7 @@ found: | |||
397 | case PCI_DEVICE_ID_VIA_82C686_4: | 397 | case PCI_DEVICE_ID_VIA_82C686_4: |
398 | /* The VT82C686B (rev 0x40) does support I2C block | 398 | /* The VT82C686B (rev 0x40) does support I2C block |
399 | transactions, but the VT82C686A (rev 0x30) doesn't */ | 399 | transactions, but the VT82C686A (rev 0x30) doesn't */ |
400 | if (!pci_read_config_byte(pdev, PCI_REVISION_ID, &temp) | 400 | if (pdev->revision >= 0x40) |
401 | && temp >= 0x40) | ||
402 | vt596_features |= FEATURE_I2CBLOCK; | 401 | vt596_features |= FEATURE_I2CBLOCK; |
403 | break; | 402 | break; |
404 | } | 403 | } |