linux/include/acpi
John Hubbard 9e987b70ad ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again
Due to commit db3e50f323 (device property: Get rid of struct
fwnode_handle type field), ACPI_HANDLE() inadvertently became
a GPL-only call. The call path that led to that was:

ACPI_HANDLE()
    ACPI_COMPANION()
        to_acpi_device_node()
            is_acpi_device_node()
                acpi_device_fwnode_ops
                    DECLARE_ACPI_FWNODE_OPS(acpi_device_fwnode_ops);

...and the new DECLARE_ACPI_FWNODE_OPS() includes
EXPORT_SYMBOL_GPL, whereas previously it was a static struct.

In order to avoid changing any of that, let's instead provide ever
so slightly better encapsulation of those struct fwnode_operations
instances. Those do not really need to be directly used in
inline function calls in header files. Simply moving two small
functions (is_acpi_device_node and is_acpi_data_node) out of
acpi_bus.h, and into a .c file, does that.

That leaves the internals of struct fwnode_operations as GPL-only
(which I think was the intent all along), but un-breaks any driver
code out there that relies on the ACPI subsystem's being (historically)
an EXPORT_SYMBOL-usable system. By that, I mean, ACPI_HANDLE() and
other basic ACPI calls were non-GPL-protected.

Also, while I'm there, remove a tiny bit of redundancy that was missed
in the earlier commit, by having is_acpi_node() use the other two
routines, instead of checking fwnode directly.

Fixes: db3e50f323 (device property: Get rid of struct fwnode_handle type field)
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-09-19 22:42:31 +02:00
..
platform ACPICA: CLib: Add short multiply/shift support 2017-08-03 23:34:16 +02:00
acbuffer.h
acconfig.h
acexcep.h
acnames.h ACPICA: Resources: Allow _DMA method in walk resources 2017-08-03 23:34:17 +02:00
acoutput.h
acpi_bus.h ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again 2017-09-19 22:42:31 +02:00
acpi_drivers.h
acpi_io.h
acpi_lpat.h
acpi_numa.h ACPI: NUMA: add missing include in acpi_numa.h 2017-07-24 22:27:43 +02:00
acpi.h ACPICA: EFI/EDK2: Sort acpi.h inclusion order 2017-08-03 23:34:16 +02:00
acpiosxf.h
acpixf.h ACPICA: Update version to 20170728 2017-08-03 23:34:18 +02:00
acrestyp.h ACPICA: Divergences: reduce access size definitions 2017-08-03 23:34:15 +02:00
actbl1.h ACPICA: Add support for new SRAT subtable 2017-06-12 14:58:38 +02:00
actbl2.h ACPICA: iASL: Add support for the SDEI table 2017-08-03 23:34:15 +02:00
actbl3.h ACPICA: Add support for new PCCT subtables 2017-06-12 14:58:39 +02:00
actbl.h ACPICA: Tables: Add deferred table verification support 2017-07-20 16:38:25 +02:00
actypes.h Merge branches 'acpi-scan' and 'acpi-pm' 2017-09-03 23:53:19 +02:00
acuuid.h ACPICA: Added two new UUID values 2017-06-12 14:50:34 +02:00
apei.h ACPI / APEI: Suppress message if HEST not present 2017-08-30 03:11:21 +02:00
button.h
cppc_acpi.h
ghes.h ACPI: APEI: fix the wrong iteration of generic error status block 2017-08-24 03:29:46 +02:00
hed.h
pcc.h
pdc_intel.h
processor.h
reboot.h
video.h