Pull i2c fixes from Wolfram Sang: "Three driver bugfixes: fixing uninitialized memory pointers (eg20t), pm/clock imbalance (qup), and a wrongly set cached variable (pc954x)" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended i2c: mux: pca954x: retry updating the mux selection on failure i2c-eg20t: fix race between i2c init and interrupt enable
Unified · Split
| @@ -773,13 +773,6 @@ static int pch_i2c_probe(struct pci_dev *pdev, · 772 unmodified lines | ||
| 773 | 773 | /* Set the number of I2C channel instance */ |
| 774 | 774 | adap_info->ch_num = id->driver_data; |
| 775 | 775 | |
| 776 | − ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED, | |
| 777 | − KBUILD_MODNAME, adap_info); | |
| 778 | − if (ret) { | |
| 779 | − pch_pci_err(pdev, "request_irq FAILED\n"); | |
| 780 | − goto err_request_irq; | |
| 781 | − } | |
| 782 | − | |
| 783 | 776 | for (i = 0; i < adap_info->ch_num; i++) { |
| 784 | 777 | pch_adap = &adap_info->pch_data[i].pch_adapter; |
| 785 | 778 | adap_info->pch_i2c_suspended = false; |
| @@ -797,6 +790,17 @@ static int pch_i2c_probe(struct pci_dev *pdev, · 11 unmodified lines | ||
| 797 | 790 | |
| 798 | 791 | pch_adap->dev.of_node = pdev->dev.of_node; |
| 799 | 792 | pch_adap->dev.parent = &pdev->dev; |
| 793 | + } | |
| 794 | + | |
| 795 | + ret = request_irq(pdev->irq, pch_i2c_handler, IRQF_SHARED, | |
| 796 | + KBUILD_MODNAME, adap_info); | |
| 797 | + if (ret) { | |
| 798 | + pch_pci_err(pdev, "request_irq FAILED\n"); | |
| 799 | + goto err_request_irq; | |
| 800 | + } | |
| 801 | + | |
| 802 | + for (i = 0; i < adap_info->ch_num; i++) { | |
| 803 | + pch_adap = &adap_info->pch_data[i].pch_adapter; | |
| 800 | 804 | |
| 801 | 805 | pch_i2c_init(&adap_info->pch_data[i]); |
| 802 | 806 | |
| @@ -1599,7 +1599,8 @@ static int qup_i2c_pm_resume_runtime(struct device *device) · 1598 unmodified lines | ||
| 1599 | 1599 | #ifdef CONFIG_PM_SLEEP |
| 1600 | 1600 | static int qup_i2c_suspend(struct device *device) |
| 1601 | 1601 | { |
| 1602 | − qup_i2c_pm_suspend_runtime(device); | |
| 1602 | + if (!pm_runtime_suspended(device)) | |
| 1603 | + return qup_i2c_pm_suspend_runtime(device); | |
| 1603 | 1604 | return 0; |
| 1604 | 1605 | } |
| 1605 | 1606 | |
| @@ -164,7 +164,7 @@ static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan) · 163 unmodified lines | ||
| 164 | 164 | /* Only select the channel if its different from the last channel */ |
| 165 | 165 | if (data->last_chan != regval) { |
| 166 | 166 | ret = pca954x_reg_write(muxc->parent, client, regval); |
| 167 | − data->last_chan = regval; | |
| 167 | + data->last_chan = ret ? 0 : regval; | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | return ret; |