X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-gpio.c;h=e62d2d938628fecbcb507cb2ef23a93186b88a09;hb=fb21affa49204acd409328415b49bfe90136653c;hp=c0330a41db039d15ddfece5a81a58abf50d6c1b9;hpb=e644dae645e167d154c0526358940986682a72b0;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index c0330a41db03..e62d2d938628 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -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;