From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Lee Jones <lee@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Peter Tyser <ptyser@xes-inc.com>
Subject: [PATCH v1 1/1] mfd: lpc_ich: Mark *_gpio_offsets data with const
Date: Tue, 24 Oct 2023 19:06:50 +0300 [thread overview]
Message-ID: <20231024160650.3898959-1-andriy.shevchenko@linux.intel.com> (raw)
There is no reason why the GPIO resource offsets should not be const.
Mark them accordingly and update a qualifier in struct lpc_ich_gpio_info
definition.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/mfd/lpc_ich.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
index ea5f01e07daf..73a0e7f9bd31 100644
--- a/drivers/mfd/lpc_ich.c
+++ b/drivers/mfd/lpc_ich.c
@@ -139,7 +139,7 @@ struct lpc_ich_gpio_info {
size_t nr_devices;
struct resource **resources;
size_t nr_resources;
- resource_size_t *offsets;
+ const resource_size_t *offsets;
};
#define APL_GPIO_NORTH 0
@@ -151,7 +151,7 @@ struct lpc_ich_gpio_info {
#define APL_GPIO_NR_RESOURCES 4
/* Offset data for Apollo Lake GPIO controllers */
-static resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = {
+static const resource_size_t apl_gpio_offsets[APL_GPIO_NR_RESOURCES] = {
[APL_GPIO_NORTH] = 0xc50000,
[APL_GPIO_NORTHWEST] = 0xc40000,
[APL_GPIO_WEST] = 0xc70000,
@@ -233,7 +233,7 @@ static const struct lpc_ich_gpio_info apl_gpio_info = {
#define DNV_GPIO_NR_RESOURCES 2
/* Offset data for Denverton GPIO controllers */
-static resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = {
+static const resource_size_t dnv_gpio_offsets[DNV_GPIO_NR_RESOURCES] = {
[DNV_GPIO_NORTH] = 0xc20000,
[DNV_GPIO_SOUTH] = 0xc50000,
};
--
2.40.0.1.gaa8946217a0b
next reply other threads:[~2023-10-24 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 16:06 Andy Shevchenko [this message]
2023-10-25 12:20 ` (subset) " Lee Jones
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=20231024160650.3898959-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ptyser@xes-inc.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