[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140901165333.GE608@arm.com>
Date: Mon, 1 Sep 2014 17:53:33 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Graeme Gregory <graeme.gregory@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>,
"linaro-acpi@...ts.linaro.org" <linaro-acpi@...ts.linaro.org>,
Rob Herring <robh@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>,
Robert Richter <rric@...nel.org>,
Jason Cooper <jason@...edaemon.net>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
Marc Zyngier <Marc.Zyngier@....com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Robert Moore <robert.moore@...el.com>,
Will Deacon <Will.Deacon@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>,
Olof Johansson <olof@...om.net>,
Liviu Dudau <Liviu.Dudau@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Lv Zheng <lv.zheng@...el.com>
Subject: Re: [Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support
for probing from ACPI
On Mon, Sep 01, 2014 at 04:28:54PM +0100, Graeme Gregory wrote:
> On Mon, Sep 01, 2014 at 05:17:51PM +0200, Arnd Bergmann wrote:
> > On Monday 01 September 2014 23:06:00 Hanjun Guo wrote:
> > > +#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_ACPI
Confused. Then how come smsc911x_drv_probe() has this line:
acpi_handle *ahandle = ACPI_HANDLE(&pdev->dev);
without any #ifdef's.
--
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists