Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1734719
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations |
| Date | 2017-09-19 10:00 +0200 |
| Message-ID | <urlBM-1m7-3@gated-at.bofh.it> (permalink) |
| References | <uq9jj-2d7-3@gated-at.bofh.it> <uq9jj-2d7-9@gated-at.bofh.it> |
| Organization | Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo |
On Fri, Sep 15, 2017 at 05:35:27PM -0700, john.hubbard@gmail.com wrote:
> From: John Hubbard <jhubbard@nvidia.com>
>
> Due to commit db3e50f3234b ("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.
>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations john.hubbard@gmail.com - 2017-09-16 02:40 +0200
[PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations john.hubbard@gmail.com - 2017-09-16 02:40 +0200
Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations Sakari Ailus <sakari.ailus@linux.intel.com> - 2017-09-18 13:00 +0200
Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-19 10:00 +0200
Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-09-19 22:50 +0200
Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-20 10:40 +0200
csiph-web