Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51e5709ad46127da9476f31336113b5401f94dba Commit: 51e5709ad46127da9476f31336113b5401f94dba Parent: 9a3180e70e35ff69586ada5421b5e7bad52f60e4 Author: Jean Delvare <[EMAIL PROTECTED]> AuthorDate: Sun Sep 9 22:29:13 2007 +0200 Committer: Jean Delvare <[EMAIL PROTECTED]> CommitDate: Sun Sep 9 22:29:13 2007 +0200
i2c-pxa: Fix adapter number It turns out that platform_device.id is a "u32" so testing it for being nonnegative is useless when setting up an i2c adapte. Instead, do what the platform_bus code does and test it against the value "-1". Signed-off-by: Jean Delvare <[EMAIL PROTECTED]> --- drivers/i2c/busses/i2c-pxa.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 9d6b790..bb5466b 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -926,7 +926,7 @@ static int i2c_pxa_probe(struct platform_device *dev) * The reason to do so is to avoid sysfs names that only make * sense when there are multiple adapters. */ - i2c->adap.nr = dev->id >= 0 ? dev->id : 0; + i2c->adap.nr = dev->id != -1 ? dev->id : 0; ret = i2c_add_numbered_adapter(&i2c->adap); if (ret < 0) { - 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 http://vger.kernel.org/majordomo-info.html