Commit d4014a6b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'extcon-next-for-5.8' of...

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
parents 0cfcfb31 b2e5575a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}
+9 −8
Original line number Diff line number Diff line
@@ -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 @@ err_rise_wake:
	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;
}

+10 −0
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;