Commit 17129d47 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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

Merge tag 'extcon-next-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-next

Chanwoo writes:

Update extcon for 4.13

Detailed description for this pull request:
- Use devm_kcalloc() and fix typo for extcon core/extcon-arizona.c.
- Add dependency ARCH_QCOM for extcon-qcom-spmi-misc.c
- Use resource-managed devm_* function for gpios on extcon-int3496.c
parents 6e5c7514 1f4be247
...@@ -115,6 +115,7 @@ config EXTCON_PALMAS ...@@ -115,6 +115,7 @@ config EXTCON_PALMAS
config EXTCON_QCOM_SPMI_MISC config EXTCON_QCOM_SPMI_MISC
tristate "Qualcomm USB extcon support" tristate "Qualcomm USB extcon support"
depends on ARCH_QCOM || COMPILE_TEST
help help
Say Y here to enable SPMI PMIC based USB cable detection Say Y here to enable SPMI PMIC based USB cable detection
support on Qualcomm PMICs such as PM8941. support on Qualcomm PMICs such as PM8941.
......
...@@ -1271,9 +1271,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev, ...@@ -1271,9 +1271,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev,
goto out; goto out;
nconfs /= entries_per_config; nconfs /= entries_per_config;
micd_configs = devm_kcalloc(dev, nconfs, sizeof(*micd_configs),
micd_configs = devm_kzalloc(dev,
nconfs * sizeof(struct arizona_micd_range),
GFP_KERNEL); GFP_KERNEL);
if (!micd_configs) { if (!micd_configs) {
ret = -ENOMEM; ret = -ENOMEM;
......
...@@ -94,8 +94,7 @@ static int int3496_probe(struct platform_device *pdev) ...@@ -94,8 +94,7 @@ static int int3496_probe(struct platform_device *pdev)
struct int3496_data *data; struct int3496_data *data;
int ret; int ret;
ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(dev), ret = devm_acpi_dev_add_driver_gpios(dev, acpi_int3496_default_gpios);
acpi_int3496_default_gpios);
if (ret) { if (ret) {
dev_err(dev, "can't add GPIO ACPI mapping\n"); dev_err(dev, "can't add GPIO ACPI mapping\n");
return ret; return ret;
...@@ -169,8 +168,6 @@ static int int3496_remove(struct platform_device *pdev) ...@@ -169,8 +168,6 @@ static int int3496_remove(struct platform_device *pdev)
devm_free_irq(&pdev->dev, data->usb_id_irq, data); devm_free_irq(&pdev->dev, data->usb_id_irq, data);
cancel_delayed_work_sync(&data->work); cancel_delayed_work_sync(&data->work);
acpi_dev_remove_driver_gpios(ACPI_COMPANION(&pdev->dev));
return 0; return 0;
} }
......
...@@ -964,12 +964,12 @@ EXPORT_SYMBOL_GPL(extcon_unregister_notifier); ...@@ -964,12 +964,12 @@ EXPORT_SYMBOL_GPL(extcon_unregister_notifier);
/** /**
* extcon_register_notifier_all() - Register a notifier block for all connectors * extcon_register_notifier_all() - Register a notifier block for all connectors
* @edev: the extcon device that has the external connecotr. * @edev: the extcon device that has the external connector.
* @nb: a notifier block to be registered. * @nb: a notifier block to be registered.
* *
* This fucntion registers a notifier block in order to receive the state * This function registers a notifier block in order to receive the state
* change of all supported external connectors from extcon device. * change of all supported external connectors from extcon device.
* And The second parameter given to the callback of nb (val) is * And the second parameter given to the callback of nb (val) is
* the current state and third parameter is the edev pointer. * the current state and third parameter is the edev pointer.
* *
* Returns 0 if success or error number if fail * Returns 0 if success or error number if fail
...@@ -1252,9 +1252,8 @@ int extcon_dev_register(struct extcon_dev *edev) ...@@ -1252,9 +1252,8 @@ int extcon_dev_register(struct extcon_dev *edev)
} }
spin_lock_init(&edev->lock); spin_lock_init(&edev->lock);
edev->nh = devm_kcalloc(&edev->dev, edev->max_supported,
edev->nh = devm_kzalloc(&edev->dev, sizeof(*edev->nh), GFP_KERNEL);
sizeof(*edev->nh) * edev->max_supported, GFP_KERNEL);
if (!edev->nh) { if (!edev->nh) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_dev; goto err_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment