aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pxa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 9d6b790d4321..bb5466b27b59 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)
926 * The reason to do so is to avoid sysfs names that only make 926 * The reason to do so is to avoid sysfs names that only make
927 * sense when there are multiple adapters. 927 * sense when there are multiple adapters.
928 */ 928 */
929 i2c->adap.nr = dev->id >= 0 ? dev->id : 0; 929 i2c->adap.nr = dev->id != -1 ? dev->id : 0;
930 930
931 ret = i2c_add_numbered_adapter(&i2c->adap); 931 ret = i2c_add_numbered_adapter(&i2c->adap);
932 if (ret < 0) { 932 if (ret < 0) {