From: Colin Ian King <colin.i.king@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Erikas Bitovtas" <xerikasxx@gmail.com>,
linux-iio@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static
Date: Tue, 14 Jul 2026 17:57:39 +0100 [thread overview]
Message-ID: <20260714165740.186119-1-colin.i.king@gmail.com> (raw)
Don't populate the read-only const array regulator_names on the stack
at run time, instead make it static const char * const
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/iio/light/vcnl4000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 128ae3f94074..b8ac156ad5c9 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -1922,7 +1922,7 @@ static void vcnl4000_cleanup(void *data)
static int vcnl4000_probe(struct i2c_client *client)
{
- const char * const regulator_names[] = { "vdd", "vio", "vled" };
+ static const char * const regulator_names[] = { "vdd", "vio", "vled" };
struct device *dev = &client->dev;
struct vcnl4000_data *data;
struct iio_dev *indio_dev;
--
2.53.0
next reply other threads:[~2026-07-14 16:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 16:57 Colin Ian King [this message]
2026-07-14 17:05 ` [PATCH][next] iio: light: vcnl4000: make read-only const array regulator_names static Andy Shevchenko
2026-07-20 1:41 ` Jonathan Cameron
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=20260714165740.186119-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=xerikasxx@gmail.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