diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index ead5e7de3e4d..30529839cbd2 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
| @@ -86,7 +86,6 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev) | |||
| 86 | struct i2c_timings *t = &dev->timings; | 86 | struct i2c_timings *t = &dev->timings; |
| 87 | u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0; | 87 | u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0; |
| 88 | 88 | ||
| 89 | dev->adapter.nr = -1; | ||
| 90 | dev->tx_fifo_depth = 32; | 89 | dev->tx_fifo_depth = 32; |
| 91 | dev->rx_fifo_depth = 32; | 90 | dev->rx_fifo_depth = 32; |
| 92 | 91 | ||
| @@ -219,7 +218,7 @@ static void i2c_dw_configure_slave(struct dw_i2c_dev *dev) | |||
| 219 | dev->mode = DW_IC_SLAVE; | 218 | dev->mode = DW_IC_SLAVE; |
| 220 | } | 219 | } |
| 221 | 220 | ||
| 222 | static void dw_i2c_set_fifo_size(struct dw_i2c_dev *dev, int id) | 221 | static void dw_i2c_set_fifo_size(struct dw_i2c_dev *dev) |
| 223 | { | 222 | { |
| 224 | u32 param, tx_fifo_depth, rx_fifo_depth; | 223 | u32 param, tx_fifo_depth, rx_fifo_depth; |
| 225 | 224 | ||
| @@ -233,7 +232,6 @@ static void dw_i2c_set_fifo_size(struct dw_i2c_dev *dev, int id) | |||
| 233 | if (!dev->tx_fifo_depth) { | 232 | if (!dev->tx_fifo_depth) { |
| 234 | dev->tx_fifo_depth = tx_fifo_depth; | 233 | dev->tx_fifo_depth = tx_fifo_depth; |
| 235 | dev->rx_fifo_depth = rx_fifo_depth; | 234 | dev->rx_fifo_depth = rx_fifo_depth; |
| 236 | dev->adapter.nr = id; | ||
| 237 | } else if (tx_fifo_depth >= 2) { | 235 | } else if (tx_fifo_depth >= 2) { |
| 238 | dev->tx_fifo_depth = min_t(u32, dev->tx_fifo_depth, | 236 | dev->tx_fifo_depth = min_t(u32, dev->tx_fifo_depth, |
| 239 | tx_fifo_depth); | 237 | tx_fifo_depth); |
| @@ -358,13 +356,17 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) | |||
| 358 | div_u64(clk_khz * t->sda_hold_ns + 500000, 1000000); | 356 | div_u64(clk_khz * t->sda_hold_ns + 500000, 1000000); |
| 359 | } | 357 | } |
| 360 | 358 | ||
| 361 | dw_i2c_set_fifo_size(dev, pdev->id); | 359 | dw_i2c_set_fifo_size(dev); |
| 362 | 360 | ||
| 363 | adap = &dev->adapter; | 361 | adap = &dev->adapter; |
| 364 | adap->owner = THIS_MODULE; | 362 | adap->owner = THIS_MODULE; |
| 365 | adap->class = I2C_CLASS_DEPRECATED; | 363 | adap->class = I2C_CLASS_DEPRECATED; |
| 366 | ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); | 364 | ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); |
| 367 | adap->dev.of_node = pdev->dev.of_node; | 365 | adap->dev.of_node = pdev->dev.of_node; |
| 366 | if (has_acpi_companion(&pdev->dev)) | ||
| 367 | adap->nr = -1; | ||
| 368 | else | ||
| 369 | adap->nr = pdev->id; | ||
| 368 | 370 | ||
| 369 | dev_pm_set_driver_flags(&pdev->dev, | 371 | dev_pm_set_driver_flags(&pdev->dev, |
| 370 | DPM_FLAG_SMART_PREPARE | | 372 | DPM_FLAG_SMART_PREPARE | |
