Merge branch 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[firefly-linux-kernel-4.4.55.git] / drivers / i2c / busses / i2c-gpio.c
index c0330a41db039d15ddfece5a81a58abf50d6c1b9..e62d2d938628fecbcb507cb2ef23a93186b88a09 100644 (file)
@@ -190,12 +190,7 @@ static int __devinit i2c_gpio_probe(struct platform_device *pdev)
        adap->dev.parent = &pdev->dev;
        adap->dev.of_node = pdev->dev.of_node;
 
-       /*
-        * If "dev->id" is negative we consider it as zero.
-        * The reason to do so is to avoid sysfs names that only make
-        * sense when there are multiple adapters.
-        */
-       adap->nr = (pdev->id != -1) ? pdev->id : 0;
+       adap->nr = pdev->id;
        ret = i2c_bit_add_numbered_bus(adap);
        if (ret)
                goto err_add_bus;