Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 155a4931 authored by Kevin Wells's avatar Kevin Wells Committed by Ben Dooks
Browse files

i2c-pnx: Map I2C adapter number to platform ID number



Map I2C adapter number to platform ID number

Signed-off-by: default avatarKevin Wells <kevin.wells@nxp.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent ef871432
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -638,7 +638,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)


	/* Register this adapter with the I2C subsystem */
	/* Register this adapter with the I2C subsystem */
	i2c_pnx->adapter->dev.parent = &pdev->dev;
	i2c_pnx->adapter->dev.parent = &pdev->dev;
	ret = i2c_add_adapter(i2c_pnx->adapter);
	i2c_pnx->adapter->nr = pdev->id;
	ret = i2c_add_numbered_adapter(i2c_pnx->adapter);
	if (ret < 0) {
	if (ret < 0) {
		dev_err(&pdev->dev, "I2C: Failed to add bus\n");
		dev_err(&pdev->dev, "I2C: Failed to add bus\n");
		goto out_irq;
		goto out_irq;