All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] bus: simple-pm-bus: Add CONFIG_ARM_AMBA for amba compatible of_device_id
Date: Mon, 14 Oct 2024 08:21:29 +0800	[thread overview]
Message-ID: <20241014002129.3173-1-jszhang@kernel.org> (raw)

I'm trying to run linux on some platforms with small size memory, so
every byte matters. The of_device_id is 196 Bytes on 32bit platforms,
add CONFIG_ARM_AMBA macro around the amba bus' of_device_id so that it
is removed if amba bus isn't used.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/bus/simple-pm-bus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c
index 50870c827889..a760500b918a 100644
--- a/drivers/bus/simple-pm-bus.c
+++ b/drivers/bus/simple-pm-bus.c
@@ -121,7 +121,9 @@ static const struct of_device_id simple_pm_bus_of_match[] = {
 	{ .compatible = "simple-bus",	.data = ONLY_BUS },
 	{ .compatible = "simple-mfd",	.data = ONLY_BUS },
 	{ .compatible = "isa",		.data = ONLY_BUS },
+#ifdef CONFIG_ARM_AMBA
 	{ .compatible = "arm,amba-bus",	.data = ONLY_BUS },
+#endif /* CONFIG_ARM_AMBA */
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);
-- 
2.45.2


                 reply	other threads:[~2024-10-14  0:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20241014002129.3173-1-jszhang@kernel.org \
    --to=jszhang@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.