diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/extcon/extcon-axp288.c | 9 |
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) | |||
| 333 | struct axp288_extcon_info *info; | 333 | struct axp288_extcon_info *info; |
| 334 | struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); | 334 | struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); |
| 335 | struct device *dev = &pdev->dev; | 335 | struct device *dev = &pdev->dev; |
| 336 | const char *name; | 336 | struct acpi_device *adev; |
| 337 | int ret, i, pirq; | 337 | int ret, i, pirq; |
| 338 | 338 | ||
| 339 | info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); | 339 | info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); |
| @@ -357,9 +357,10 @@ static int axp288_extcon_probe(struct platform_device *pdev) | |||
| 357 | if (ret) | 357 | if (ret) |
| 358 | return ret; | 358 | return ret; |
| 359 | 359 | ||
| 360 | name = acpi_dev_get_first_match_name("INT3496", NULL, -1); | 360 | adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1); |
| 361 | if (name) { | 361 | if (adev) { |
| 362 | info->id_extcon = extcon_get_extcon_dev(name); | 362 | info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev)); |
| 363 | put_device(&adev->dev); | ||
| 363 | if (!info->id_extcon) | 364 | if (!info->id_extcon) |
| 364 | return -EPROBE_DEFER; | 365 | return -EPROBE_DEFER; |
| 365 | 366 | ||
