From: Adrian Hunter <adrian.hunter@intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Jean Delvare <jdelvare@suse.com>
Cc: Takashi Iwai <tiwai@suse.de>,
"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mmc: sdhci-acpi: Check device status before calling fix_up_power()
Date: Thu, 2 Mar 2017 13:53:32 +0200 [thread overview]
Message-ID: <4481f84f-22a6-4ee6-9875-d5e03729b6fd@intel.com> (raw)
In-Reply-To: <20170225172357.26294-3-hdegoede@redhat.com>
On 25/02/17 19:23, Hans de Goede wrote:
> Calling acpi_device_fix_up_power() on a device which is not present
> is not a good idea.
>
> While at it also call acpi_bus_get_status() on the children before
> the status check to make sure that child->status contains valid data.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-acpi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index 96465ff..873beae 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -394,15 +394,15 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
> if (acpi_bus_get_device(handle, &device))
> return -ENODEV;
>
> + if (acpi_bus_get_status(device) || !device->status.present)
> + return -ENODEV;
> +
> /* Power on the SDHCI controller and its children */
> acpi_device_fix_up_power(device);
> list_for_each_entry(child, &device->children, node)
> if (child->status.present && child->status.enabled)
> acpi_device_fix_up_power(child);
>
> - if (acpi_bus_get_status(device) || !device->status.present)
> - return -ENODEV;
> -
> if (sdhci_acpi_byt_defer(dev))
> return -EPROBE_DEFER;
>
>
next prev parent reply other threads:[~2017-03-02 12:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 17:23 [PATCH 0/3] Allow setting dmi-product-name on the cmdline + dmi sdhci quirk Hans de Goede
2017-02-25 17:23 ` [PATCH 1/3] firmware: dmi_scan: Add dmi_product_name kernel cmdline option Hans de Goede
2017-03-03 9:24 ` Jean Delvare
2017-03-03 14:27 ` Hans de Goede
2017-03-09 9:59 ` Jean Delvare
2017-03-09 10:43 ` Hans de Goede
2017-03-20 17:35 ` Takashi Iwai
2017-04-04 10:21 ` Hans de Goede
2017-02-25 17:23 ` [PATCH 2/3] mmc: sdhci-acpi: Check device status before calling fix_up_power() Hans de Goede
2017-02-25 18:31 ` Hans de Goede
2017-03-02 11:53 ` Adrian Hunter [this message]
2017-03-03 9:09 ` Jean Delvare
2017-03-03 13:59 ` Hans de Goede
2017-02-25 17:23 ` [PATCH 3/3] mmc: sdhci-acpi: Add a quirk to not break wifi on GPD WIN I55 machines Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4481f84f-22a6-4ee6-9875-d5e03729b6fd@intel.com \
--to=adrian.hunter@intel.com \
--cc=hdegoede@redhat.com \
--cc=jdelvare@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=russianneuromancer@ya.ru \
--cc=tiwai@suse.de \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox