From: Hans de Goede Subject: [PATCH v2 resend 1/2] mmc: sdhci-acpi: Remove unneeded acpi_bus_get_status() call Date: Sun, 26 Mar 2017 13:15:08 +0200 Message-ID: <20170326111509.1474-1-hdegoede@redhat.com> Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38558 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264AbdCZLWU (ORCPT ); Sun, 26 Mar 2017 07:22:20 -0400 Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Adrian Hunter , Ulf Hansson Cc: Hans de Goede , linux-mmc@vger.kernel.org The acpi-subsys already calls acpi_bus_get_status() and checks that device->status.present is set before even registering the platform_device so out probe function will never get called if device->status.present is false and there is no need for this check. Signed-off-by: Hans de Goede --- Changes in v2: -This is a new patch replacing "mmc: sdhci-acpi: Check device status before calling fix_up_power()" --- drivers/mmc/host/sdhci-acpi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 9dcb704..ae00e4c 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -398,9 +398,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev) 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; -- 2.9.3