lkml.org 
[lkml]   [2014]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI
Date
On Monday 01 September 2014 16:28:54 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

That should be easy to fix, and a good idea in general, independent
of this patch.
We generally make function declarations and type definitions visible
(possibly empty) for disabled subsystems so the code using them
silently goes away when that subsystem is disabled.

Arnd


\
 
 \ /
  Last update: 2014-09-01 18:01    [W:0.065 / U:10.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site