Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'extcon-next-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Update extcon for v5.8

Detailed description for this pull request:
1. Update extcon provider driver
- Fix an error handling code by using devm_iio_channel_get() for extcon-adc-jac.c
- Fix the usage counter imbalance of runtime PM for extcon-arizona.c.
- Add proper dt-compatible string for extcon-max14577.c.

2. Update extcon core with minor updates:
- Remove unneeded initialization of local variable in extcon_register_notifier

* tag 'extcon-next-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon:
extcon: arizona: Fix runtime PM imbalance on error
extcon: max14577: Add proper dt-compatible strings
extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
extcon: remove redundant assignment to variable idx

+21 -11
+1 -2
drivers/extcon/extcon-adc-jack.c
··· 124 124 for (i = 0; data->adc_conditions[i].id != EXTCON_NONE; i++); 125 125 data->num_conditions = i; 126 126 127 - data->chan = iio_channel_get(&pdev->dev, pdata->consumer_channel); 127 + data->chan = devm_iio_channel_get(&pdev->dev, pdata->consumer_channel); 128 128 if (IS_ERR(data->chan)) 129 129 return PTR_ERR(data->chan); 130 130 ··· 164 164 165 165 free_irq(data->irq, data); 166 166 cancel_work_sync(&data->handler.work); 167 - iio_channel_release(data->chan); 168 167 169 168 return 0; 170 169 }
+9 -8
drivers/extcon/extcon-arizona.c
··· 1460 1460 if (!info->input) { 1461 1461 dev_err(arizona->dev, "Can't allocate input dev\n"); 1462 1462 ret = -ENOMEM; 1463 - goto err_register; 1463 + return ret; 1464 1464 } 1465 1465 1466 1466 info->input->name = "Headset"; ··· 1492 1492 if (ret != 0) { 1493 1493 dev_err(arizona->dev, "Failed to request GPIO%d: %d\n", 1494 1494 pdata->micd_pol_gpio, ret); 1495 - goto err_register; 1495 + return ret; 1496 1496 } 1497 1497 1498 1498 info->micd_pol_gpio = gpio_to_desc(pdata->micd_pol_gpio); ··· 1515 1515 dev_err(arizona->dev, 1516 1516 "Failed to get microphone polarity GPIO: %d\n", 1517 1517 ret); 1518 - goto err_register; 1518 + return ret; 1519 1519 } 1520 1520 } 1521 1521 ··· 1672 1672 if (ret != 0) { 1673 1673 dev_err(&pdev->dev, "Failed to get JACKDET rise IRQ: %d\n", 1674 1674 ret); 1675 - goto err_gpio; 1675 + goto err_pm; 1676 1676 } 1677 1677 1678 1678 ret = arizona_set_irq_wake(arizona, jack_irq_rise, 1); ··· 1721 1721 dev_warn(arizona->dev, "Failed to set MICVDD to bypass: %d\n", 1722 1722 ret); 1723 1723 1724 - pm_runtime_put(&pdev->dev); 1725 - 1726 1724 ret = input_register_device(info->input); 1727 1725 if (ret) { 1728 1726 dev_err(&pdev->dev, "Can't register input device: %d\n", ret); 1729 1727 goto err_hpdet; 1730 1728 } 1729 + 1730 + pm_runtime_put(&pdev->dev); 1731 1731 1732 1732 return 0; 1733 1733 ··· 1743 1743 arizona_set_irq_wake(arizona, jack_irq_rise, 0); 1744 1744 err_rise: 1745 1745 arizona_free_irq(arizona, jack_irq_rise, info); 1746 + err_pm: 1747 + pm_runtime_put(&pdev->dev); 1748 + pm_runtime_disable(&pdev->dev); 1746 1749 err_gpio: 1747 1750 gpiod_put(info->micd_pol_gpio); 1748 - err_register: 1749 - pm_runtime_disable(&pdev->dev); 1750 1751 return ret; 1751 1752 } 1752 1753
+10
drivers/extcon/extcon-max14577.c
··· 782 782 }; 783 783 MODULE_DEVICE_TABLE(platform, max14577_muic_id); 784 784 785 + static const struct of_device_id of_max14577_muic_dt_match[] = { 786 + { .compatible = "maxim,max14577-muic", 787 + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, 788 + { .compatible = "maxim,max77836-muic", 789 + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, 790 + { }, 791 + }; 792 + MODULE_DEVICE_TABLE(of, of_max14577_muic_dt_match); 793 + 785 794 static struct platform_driver max14577_muic_driver = { 786 795 .driver = { 787 796 .name = "max14577-muic", 797 + .of_match_table = of_max14577_muic_dt_match, 788 798 }, 789 799 .probe = max14577_muic_probe, 790 800 .remove = max14577_muic_remove,
+1 -1
drivers/extcon/extcon.c
··· 900 900 struct notifier_block *nb) 901 901 { 902 902 unsigned long flags; 903 - int ret, idx = -EINVAL; 903 + int ret, idx; 904 904 905 905 if (!edev || !nb) 906 906 return -EINVAL;