aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2013-04-10 00:36:39 +0000
committerWolfram Sang <wsa@the-dreams.de>2013-04-15 18:17:28 +0200
commitefe7d640ef486c4c0c305641dbcacc6918542b76 (patch)
treec478b1c7fd8d866f36bc7a5e6022efe312982293 /drivers/i2c
parent76cf3fc844a46b5cdb94da98bffcbd45d4c355b8 (diff)
i2c-designware: use dynamic adapter numbering on Lynxpoint
It is not good idea to mix static and dynamic I2C adapter numbering. In this particular case on Lynxpoint we had graphics I2C adapter which took the first numbers preventing the designware I2C driver from using the adapter numbers it preferred. Since Lynxpoint support was just introduced and there is no hardware available outside Intel we can fix this by switching to use dynamic adapter numbering instead of static. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index c53a3127f69..2a596dd1ec6 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -56,20 +56,11 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
static int dw_i2c_acpi_configure(struct platform_device *pdev)
{
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
- struct acpi_device *adev;
- int busno, ret;
if (!ACPI_HANDLE(&pdev->dev))
return -ENODEV;
- ret = acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev);
- if (ret)
- return -ENODEV;
-
dev->adapter.nr = -1;
- if (adev->pnp.unique_id && !kstrtoint(adev->pnp.unique_id, 0, &busno))
- dev->adapter.nr = busno;
-
dev->tx_fifo_depth = 32;
dev->rx_fifo_depth = 32;
return 0;