[Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI

Sudeep Holla sudeep.holla at arm.com
Mon Sep 1 10:33:18 PDT 2014



On 01/09/14 18:14, Catalin Marinas wrote:
> On Mon, Sep 01, 2014 at 06:08:49PM +0100, Sudeep Holla wrote:
>> On 01/09/14 17:58, Mark Brown wrote:
>>> On Mon, Sep 01, 2014 at 05:53:33PM +0100, Catalin Marinas wrote:
>>>
>>>> Confused. Then how come smsc911x_drv_probe() has this line:
>>>
>>>> 	acpi_handle *ahandle = ACPI_HANDLE(&pdev->dev);
>>>
>>>> without any #ifdef's.
>>>
>>> There's a stub smsc911x_probe_config_acpi() provided in the non-ACPI
>>> case, Arnd's suggestion is basically to remove the stub.
>>>
>>
>> I think Catalin is referring to ACPI_HANDLE used without any #ifdefs
>>
>> Catalin, few macros like ACPI_HANDLE and ACPI_PTR are defined in
>> include/linux/acpi.h even when CONFIG_ACPI is not set mainly to
>> avoid #ifdef's around simple assignments like the above one and one
>> in platform_driver.acpi_match_table
>
> My comment was to Graeme who said that #ifdef's were needed because
> acpi_handle (lowercase) was not defined in the !CONFIG_ACPI case.
> However, further down in the patch it was used without any #ifdef's.
>

Ah OK, I misunderstood. In that case Graeme statement is wrong.
IIRC acpi_handle is not structure, it's just a ptr used for object
references in ACPI namespace and is available even when !CONFIG_ACPI

Regards,
Sudeep




More information about the linux-arm-kernel mailing list