ASoC: fsl/powerpc: don't rely on the cell-index property
authorTimur Tabi <timur@freescale.com>
Fri, 2 Dec 2011 01:52:47 +0000 (19:52 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 2 Dec 2011 10:37:18 +0000 (10:37 +0000)
commit6132725eac521b89dee3d58df3c6d04a1e50844c
tree994019cc02aacabc13f06353b91ee3525c47b0c6
parenta806aa9207ad59933464efbe6009394723713c0d
ASoC: fsl/powerpc: don't rely on the cell-index property

Instead of using the 'cell-index' property in the I2C adapter node to
determine the adapter number, just query the i2c_adapter object directly.

Previously, the I2C nodes always appeared in cell-index order, so the
dynamic numbering coincided with the cell-index property.  With commit
ab827d97 ("powerpc/85xx: Rework P1022DS device tree"), the I2C nodes are
unintentionally reversed in the device tree, and so the machine driver
guesses the wrong I2C adapter number.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/fsl/p1022_ds.c