On Sun, 2015-11-01 at 17:32 +0100, Christian Fetzer wrote:
> Request the SMBus base address index region once in piix4_probe. This
> is particularly useful when using the multiplexed adapter in SB800 as
> it avoids requesting and releasing the region on every transfer.
> @@ -616,16 +612,26 @@ static int piix4_add_adapter(struct pci_dev
> *dev, unsigned short smba,
>
> static int piix4_probe(struct pci_dev *dev, const struct
> pci_device_id *id)
> {
> + unsigned short smba_idx = 0xcd6;
> int retval;
>
> if ((dev->vendor == PCI_VENDOR_ID_ATI &&
> dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
> dev->revision >= 0x40) ||
> - dev->vendor == PCI_VENDOR_ID_AMD)
> + dev->vendor == PCI_VENDOR_ID_AMD) {
> +
Redundant empty line.
> + if (!request_region(smba_idx, 2, "smba_idx")) {
> + dev_err(&dev->dev, "SMBus base address index
> region "
> + "0x%x already in use!\n", smba_idx);
Do not split string literals, something like following will be okay.
dev_err(&dev->dev,
"SMBus base address index region 0x%x already in use!\n",
smba_idx);
> + return -EBUSY;
> + }
> + piix4_smb_idx_sb800 = smba_idx;
> +
> /* base address location etc changed in SB800 */
> retval = piix4_setup_sb800(dev, id, 0);
> - else
> + } else {
> retval = piix4_setup(dev, id);
> + }
--
Andy Shevchenko <[email protected]>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html