linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/2] acpi: Fail GED probe when not on hardware-reduced
Date: Fri, 11 Oct 2019 12:38:49 +0200	[thread overview]
Message-ID: <CAJZ5v0ioC6XnC+sFpRJmm40T+YCnqoaHhJ+_Pmk7rvvC8UPT9w@mail.gmail.com> (raw)
In-Reply-To: <20191009130433.29134-2-sameo@linux.intel.com>

On Wed, Oct 9, 2019 at 3:04 PM Samuel Ortiz <sameo@linux.intel.com> wrote:
>
> The Generic Event Device (GED) is a hardware-reduced platform device.

No, it is not AFAICS.

The spec doesn't say that GED cannot be used on platforms that aren't
HW-reduced and if evged.c is going to be built in unconditionally, the
kernel will be able to handle GED regardless.

> Probing this driver on fixed platforms should fail.
>
> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> ---
>  drivers/acpi/evged.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
> index aba0d0027586..55de4b2d2fee 100644
> --- a/drivers/acpi/evged.c
> +++ b/drivers/acpi/evged.c
> @@ -127,6 +127,9 @@ static int ged_probe(struct platform_device *pdev)
>         struct acpi_ged_device *geddev;
>         acpi_status acpi_ret;
>
> +       if (!acpi_gbl_reduced_hardware)
> +               return -ENODEV;
> +
>         geddev = devm_kzalloc(&pdev->dev, sizeof(*geddev), GFP_KERNEL);
>         if (!geddev)
>                 return -ENOMEM;
> --
> 2.21.0
>

  reply	other threads:[~2019-10-11 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 13:04 [PATCH 0/2] acpi: Unconditional GED build Samuel Ortiz
2019-10-09 13:04 ` [PATCH 1/2] acpi: Fail GED probe when not on hardware-reduced Samuel Ortiz
2019-10-11 10:38   ` Rafael J. Wysocki [this message]
2019-10-11 12:14     ` Samuel Ortiz
2019-10-14  8:55       ` Rafael J. Wysocki
2019-10-09 13:04 ` [PATCH 2/2] acpi: Always build evged in Samuel Ortiz

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=CAJZ5v0ioC6XnC+sFpRJmm40T+YCnqoaHhJ+_Pmk7rvvC8UPT9w@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sameo@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;
as well as URLs for NNTP newsgroup(s).