summaryrefslogtreecommitdiff
path: root/drivers/extcon/extcon-axp288.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-04-02 16:20:47 +0700
committerMark Brown <broonie@kernel.org>2019-04-02 16:20:47 +0700
commit6d5e2bf9d203e4d9e08ca2e9420c6ff22ad190af (patch)
treec2c20648773d3326f942e34ef73b06566f7a19ec /drivers/extcon/extcon-axp288.c
parentb820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 (diff)
parent257f9053c0204ea47491aa236004fd1226f75fa8 (diff)
Merge branch 'acpi-utils' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into asoc-5.2
Diffstat (limited to 'drivers/extcon/extcon-axp288.c')
-rw-r--r--drivers/extcon/extcon-axp288.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index a983708b77a6..50f9402fb325 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -333,7 +333,7 @@ static int axp288_extcon_probe(struct platform_device *pdev)
struct axp288_extcon_info *info;
struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
struct device *dev = &pdev->dev;
- const char *name;
+ struct acpi_device *adev;
int ret, i, pirq;
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
@@ -357,9 +357,10 @@ static int axp288_extcon_probe(struct platform_device *pdev)
if (ret)
return ret;
- name = acpi_dev_get_first_match_name("INT3496", NULL, -1);
- if (name) {
- info->id_extcon = extcon_get_extcon_dev(name);
+ adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1);
+ if (adev) {
+ info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev));
+ put_device(&adev->dev);
if (!info->id_extcon)
return -EPROBE_DEFER;