diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-25 14:41:02 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-25 14:41:02 +0200 |
commit | 3022f4de491c096650d55ae9d562a9c811830724 (patch) | |
tree | 928514c1b7c423ed130af2214bed69008d14d3ee /drivers/acpi/acpi_lpss.c | |
parent | ACPI / LPSS: support for fractional divider clock (diff) | |
parent | ACPI / platform / LPSS: Enable async suspend/resume of LPSS devices (diff) | |
download | linux-3022f4de491c096650d55ae9d562a9c811830724.tar.xz linux-3022f4de491c096650d55ae9d562a9c811830724.zip |
Merge branch 'acpi-platform' into acpi-lpss
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index d1c9b04e29a3..db362a96c38e 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -305,12 +305,14 @@ static int acpi_lpss_create_device(struct acpi_device *adev, struct lpss_private_data *pdata; struct resource_list_entry *rentry; struct list_head resource_list; + struct platform_device *pdev; int ret; dev_desc = (struct lpss_device_desc *)id->driver_data; - if (!dev_desc) - return acpi_create_platform_device(adev, id); - + if (!dev_desc) { + pdev = acpi_create_platform_device(adev); + return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1; + } pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; @@ -360,10 +362,13 @@ static int acpi_lpss_create_device(struct acpi_device *adev, dev_desc->setup(pdata); adev->driver_data = pdata; - ret = acpi_create_platform_device(adev, id); - if (ret > 0) - return ret; + pdev = acpi_create_platform_device(adev); + if (!IS_ERR_OR_NULL(pdev)) { + device_enable_async_suspend(&pdev->dev); + return 1; + } + ret = PTR_ERR(pdev); adev->driver_data = NULL; err_out: |