[Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI
From: Graeme Gregory <hidden>
Date: 2014-09-01 17:03:05
Also in:
linux-acpi, lkml
From: Graeme Gregory <hidden>
Date: 2014-09-01 17:03:05
Also in:
linux-acpi, lkml
On Mon, Sep 01, 2014 at 05:53:33PM +0100, Catalin Marinas wrote:
On Mon, Sep 01, 2014 at 04:28:54PM +0100, Graeme Gregory wrote:quoted
On Mon, Sep 01, 2014 at 05:17:51PM +0200, Arnd Bergmann wrote:quoted
On Monday 01 September 2014 23:06:00 Hanjun Guo wrote:quoted
+#ifdef CONFIG_ACPI +/* Configure some sensible defaults for ACPI mode */ +static int smsc911x_probe_config_acpi(struct smsc911x_platform_config *config, + acpi_handle *ahandle) +{ + if (!ahandle) + return -ENOSYS; + + config->phy_interface = PHY_INTERFACE_MODE_MII;Please remove the #ifdef and use if (!IS_ENABLED(CONFIG_ACPI) || !ahandle) to check for ACPI support. This should result in the same object code in all cases, but give better compile-time coverage when ACPI is disabled.struct acpi_handle does not exist in the case !CONFIG_ACPIConfused. Then how come smsc911x_drv_probe() has this line: acpi_handle *ahandle = ACPI_HANDLE(&pdev->dev); without any #ifdef's.
It is possible I confused myself as some types moved around in ACPI recently. I will re-check! Graeme