mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: john.hubbard@gmail.com
Cc: LKML <linux-kernel@vger.kernel.org>,
	Rob Herring <robh@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH 1/1] acpi: unbreak ACPI_HANDLE(), encapsulate fwnode_operations
Date: Tue, 19 Sep 2017 10:44:00 +0300	[thread overview]
Message-ID: <20170919074400.GG4630@lahna.fi.intel.com> (raw)
In-Reply-To: <20170916003527.3081-2-jhubbard@nvidia.com>

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>

  parent reply	other threads:[~2017-09-19  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-16  0:35 [PATCH 0/1] " john.hubbard
2017-09-16  0:35 ` [PATCH 1/1] " john.hubbard
2017-09-18 10:50   ` Sakari Ailus
2017-09-19  7:44   ` Mika Westerberg [this message]
2017-09-19 20:39     ` Rafael J. Wysocki
2017-09-20  8:34       ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170919074400.GG4630@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=jhubbard@nvidia.com \
    --cc=john.hubbard@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome