All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@googlemail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org
Subject: [PATCH resend] ACPI / PNP: constify device IDs
Date: Sat,  2 Jan 2016 11:30:09 +0100	[thread overview]
Message-ID: <1451730609-2722-1-git-send-email-minipli@googlemail.com> (raw)

Instead of re-creating the array on the stack each time
is_cmos_rtc_device() gets called, make the array 'static const'.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
This is a resend of patch 4/12 of [1], in case it got forgotten
in the meantime.

[1] http://thread.gmane.org/gmane.linux.acpi.devel/76528

 drivers/acpi/acpi_pnp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
index ff6d8adc9cda..9d20ba66d33b 100644
--- a/drivers/acpi/acpi_pnp.c
+++ b/drivers/acpi/acpi_pnp.c
@@ -368,7 +368,7 @@ static struct acpi_scan_handler acpi_pnp_handler = {
  */
 static int is_cmos_rtc_device(struct acpi_device *adev)
 {
-	struct acpi_device_id ids[] = {
+	static const struct acpi_device_id ids[] = {
 		{ "PNP0B00" },
 		{ "PNP0B01" },
 		{ "PNP0B02" },
-- 
1.7.10.4


             reply	other threads:[~2016-01-02 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02 10:30 Mathias Krause [this message]
2016-01-05 12:58 ` [PATCH resend] ACPI / PNP: constify device IDs Rafael J. Wysocki

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=1451730609-2722-1-git-send-email-minipli@googlemail.com \
    --to=minipli@googlemail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.