Commit:     ccf60d8571f0e606b5dacf213696b7a57fe2d890
Parent:     541b6a7a69fadda82f313bd2176e7756db2b5b43
Author:     Olof Johansson <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 27 18:14:44 2008 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Jan 27 18:14:44 2008 +0100

    i2c-pasemi: use i2c_add_numbered_adapter()
    Use numbered adapter registration to always have the same hardware bus
    show up at the same number.
    PWRficient 1682M has three buses, they are all on the same PCI device but
    different functions. So do the simple thing and register them based on
    function number. Future products, if having a different number of busses,
    are expected to have similar behaviour w.r.t. device/function layout.
    Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
 drivers/i2c/busses/i2c-pasemi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c
index ca18e0b..1603c81 100644
--- a/drivers/i2c/busses/i2c-pasemi.c
+++ b/drivers/i2c/busses/i2c-pasemi.c
@@ -368,6 +368,7 @@ static int __devinit pasemi_smb_probe(struct pci_dev *dev,
        smbus->adapter.class = I2C_CLASS_HWMON;
        smbus->adapter.algo = &smbus_algorithm;
        smbus->adapter.algo_data = smbus;
+       smbus-> = PCI_FUNC(dev->devfn);
        /* set up the sysfs linkage to our parent device */
        smbus-> = &dev->dev;
@@ -375,7 +376,7 @@ static int __devinit pasemi_smb_probe(struct pci_dev *dev,
        reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR |
                  (CLK_100K_DIV & CTL_CLK_M)));
-       error = i2c_add_adapter(&smbus->adapter);
+       error = i2c_add_numbered_adapter(&smbus->adapter);
        if (error)
                goto out_release_region;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to