mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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 -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEEsSpuqBtbWtRe4rLGnM3fLN7rz1MFAl7QyiEWHGN3MDAuY2hv aUBzYW1zdW5nLmNvbQAKCRCczd8s3uvPU7W8D/0Y/PVEt8IvJmkDlKbiXOM8cMD3 ZUgBrCVVs6y2tkinhgROXfAdAIpQMh/E/If8iqrCQhpa0cQJ7v4EgFK29OrN779M c1O4BxHB4m27mlEyFBGbMUbqpyV05vr/VBhAtnyK3jSxv6PXZ1EQKeqLnqgOENrL +qipYc9S05XNf/pxpB+46gh/J77k05SzMVkO8HLkFJ47sN2b0i5Efdpg2UIpA2S+ p2b8QEDgNBHMYkQK0W7eKp6Ot+tqMCy9nRYm4F4qB6yrMWPh+QfWcUpMA7OmqxaJ Gntu+zHCiX2HARokuPP5P67ojFoxluXoQv0vQbU3p8i7lt5B4fLyV+nXf5UCrXmx FVOjEDcWpYeQp4Yp3mB51jtG4b/E70GIYfTdS6fr5uG3d/q+2d2PQHK0tugr4m0q dLsewfo2hhpuyy39CjpjRCQdrtf5uFmZxLiKb/SGDrWYbmdXsuoBVfy3Z64jGP/4 xX7jANivR78znq37xw8NnagAQnQMlLQFvZkLgSXI+ktX+q768IIzZtuxdLp2NbVl 30GOqVKpMVz/rkKQ7++BWrwjVDIvZBcb9kAYgMxQVjvBn2W9pt6g4y4TVf96/J0d /y4wAWJtEOeB8c9+4YX+EQdpBGMwydS/zgRwc0raeHcS4YFZqDxUSnltMQwAxhTR nPZ3SkZ7FmZOr5zw5A== =tduE -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
d4014a6b46
|
|
@ -124,7 +124,7 @@ static int adc_jack_probe(struct platform_device *pdev)
|
|||
for (i = 0; data->adc_conditions[i].id != EXTCON_NONE; i++);
|
||||
data->num_conditions = i;
|
||||
|
||||
data->chan = iio_channel_get(&pdev->dev, pdata->consumer_channel);
|
||||
data->chan = devm_iio_channel_get(&pdev->dev, pdata->consumer_channel);
|
||||
if (IS_ERR(data->chan))
|
||||
return PTR_ERR(data->chan);
|
||||
|
||||
|
|
@ -164,7 +164,6 @@ static int adc_jack_remove(struct platform_device *pdev)
|
|||
|
||||
free_irq(data->irq, data);
|
||||
cancel_work_sync(&data->handler.work);
|
||||
iio_channel_release(data->chan);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1460,7 +1460,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
if (!info->input) {
|
||||
dev_err(arizona->dev, "Can't allocate input dev\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_register;
|
||||
return ret;
|
||||
}
|
||||
|
||||
info->input->name = "Headset";
|
||||
|
|
@ -1492,7 +1492,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
if (ret != 0) {
|
||||
dev_err(arizona->dev, "Failed to request GPIO%d: %d\n",
|
||||
pdata->micd_pol_gpio, ret);
|
||||
goto err_register;
|
||||
return ret;
|
||||
}
|
||||
|
||||
info->micd_pol_gpio = gpio_to_desc(pdata->micd_pol_gpio);
|
||||
|
|
@ -1515,7 +1515,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
dev_err(arizona->dev,
|
||||
"Failed to get microphone polarity GPIO: %d\n",
|
||||
ret);
|
||||
goto err_register;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1672,7 +1672,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
if (ret != 0) {
|
||||
dev_err(&pdev->dev, "Failed to get JACKDET rise IRQ: %d\n",
|
||||
ret);
|
||||
goto err_gpio;
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
ret = arizona_set_irq_wake(arizona, jack_irq_rise, 1);
|
||||
|
|
@ -1721,14 +1721,14 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
dev_warn(arizona->dev, "Failed to set MICVDD to bypass: %d\n",
|
||||
ret);
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
ret = input_register_device(info->input);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Can't register input device: %d\n", ret);
|
||||
goto err_hpdet;
|
||||
}
|
||||
|
||||
pm_runtime_put(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_hpdet:
|
||||
|
|
@ -1743,10 +1743,11 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
|||
arizona_set_irq_wake(arizona, jack_irq_rise, 0);
|
||||
err_rise:
|
||||
arizona_free_irq(arizona, jack_irq_rise, info);
|
||||
err_pm:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
err_gpio:
|
||||
gpiod_put(info->micd_pol_gpio);
|
||||
err_register:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -782,9 +782,19 @@ static const struct platform_device_id max14577_muic_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(platform, max14577_muic_id);
|
||||
|
||||
static const struct of_device_id of_max14577_muic_dt_match[] = {
|
||||
{ .compatible = "maxim,max14577-muic",
|
||||
.data = (void *)MAXIM_DEVICE_TYPE_MAX14577, },
|
||||
{ .compatible = "maxim,max77836-muic",
|
||||
.data = (void *)MAXIM_DEVICE_TYPE_MAX77836, },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, of_max14577_muic_dt_match);
|
||||
|
||||
static struct platform_driver max14577_muic_driver = {
|
||||
.driver = {
|
||||
.name = "max14577-muic",
|
||||
.of_match_table = of_max14577_muic_dt_match,
|
||||
},
|
||||
.probe = max14577_muic_probe,
|
||||
.remove = max14577_muic_remove,
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
|
|||
struct notifier_block *nb)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret, idx = -EINVAL;
|
||||
int ret, idx;
|
||||
|
||||
if (!edev || !nb)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user