* [PATCH 0/2] Input - constify read-only struct regmap_config
@ 2024-07-05 17:38 Javier Carrasco
2024-07-05 17:38 ` [PATCH 1/2] Input: qt1050 - constify " Javier Carrasco
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Javier Carrasco @ 2024-07-05 17:38 UTC (permalink / raw)
To: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-input, linux-kernel, imx, linux-arm-kernel, Javier Carrasco
This series adds the const modifier to the remaining regmap_config
structs in the input subsystem that are effectively used as const
(i.e., only read after their declaration), but kept as writtable data.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (2):
Input: qt1050 - constify struct regmap_config
Input: fsl-imx25-tcq - constify struct regmap_config
drivers/input/keyboard/qt1050.c | 2 +-
drivers/input/touchscreen/fsl-imx25-tcq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240705-input-const-regmap_config-46d2fb3110bd
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] Input: qt1050 - constify struct regmap_config
2024-07-05 17:38 [PATCH 0/2] Input - constify read-only struct regmap_config Javier Carrasco
@ 2024-07-05 17:38 ` Javier Carrasco
2024-07-05 17:38 ` [PATCH 2/2] Input: fsl-imx25-tcq " Javier Carrasco
2024-07-08 17:11 ` [PATCH 0/2] Input - constify read-only " Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Javier Carrasco @ 2024-07-05 17:38 UTC (permalink / raw)
To: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-input, linux-kernel, imx, linux-arm-kernel, Javier Carrasco
`qt1050_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
drivers/input/keyboard/qt1050.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c
index 056e9bc26026..5a2592e6293d 100644
--- a/drivers/input/keyboard/qt1050.c
+++ b/drivers/input/keyboard/qt1050.c
@@ -208,7 +208,7 @@ static const struct regmap_access_table qt1050_writeable_table = {
.n_yes_ranges = ARRAY_SIZE(qt1050_writeable_ranges),
};
-static struct regmap_config qt1050_regmap_config = {
+static const struct regmap_config qt1050_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = QT1050_RES_CAL,
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] Input: fsl-imx25-tcq - constify struct regmap_config
2024-07-05 17:38 [PATCH 0/2] Input - constify read-only struct regmap_config Javier Carrasco
2024-07-05 17:38 ` [PATCH 1/2] Input: qt1050 - constify " Javier Carrasco
@ 2024-07-05 17:38 ` Javier Carrasco
2024-07-08 17:11 ` [PATCH 0/2] Input - constify read-only " Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Javier Carrasco @ 2024-07-05 17:38 UTC (permalink / raw)
To: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: linux-input, linux-kernel, imx, linux-arm-kernel, Javier Carrasco
`mx25_tcq_regconfig` is not modified and can be declared as const to
move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
drivers/input/touchscreen/fsl-imx25-tcq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/fsl-imx25-tcq.c b/drivers/input/touchscreen/fsl-imx25-tcq.c
index 60a7246c5157..a32708652d10 100644
--- a/drivers/input/touchscreen/fsl-imx25-tcq.c
+++ b/drivers/input/touchscreen/fsl-imx25-tcq.c
@@ -38,7 +38,7 @@ struct mx25_tcq_priv {
struct device *dev;
};
-static struct regmap_config mx25_tcq_regconfig = {
+static const struct regmap_config mx25_tcq_regconfig = {
.fast_io = true,
.max_register = 0x5c,
.reg_bits = 32,
--
2.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Input - constify read-only struct regmap_config
2024-07-05 17:38 [PATCH 0/2] Input - constify read-only struct regmap_config Javier Carrasco
2024-07-05 17:38 ` [PATCH 1/2] Input: qt1050 - constify " Javier Carrasco
2024-07-05 17:38 ` [PATCH 2/2] Input: fsl-imx25-tcq " Javier Carrasco
@ 2024-07-08 17:11 ` Dmitry Torokhov
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2024-07-08 17:11 UTC (permalink / raw)
To: Javier Carrasco
Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
linux-input, linux-kernel, imx, linux-arm-kernel
On Fri, Jul 05, 2024 at 07:38:49PM +0200, Javier Carrasco wrote:
> This series adds the const modifier to the remaining regmap_config
> structs in the input subsystem that are effectively used as const
> (i.e., only read after their declaration), but kept as writtable data.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
> Javier Carrasco (2):
> Input: qt1050 - constify struct regmap_config
> Input: fsl-imx25-tcq - constify struct regmap_config
>
> drivers/input/keyboard/qt1050.c | 2 +-
> drivers/input/touchscreen/fsl-imx25-tcq.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Applied the lot, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-08 17:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 17:38 [PATCH 0/2] Input - constify read-only struct regmap_config Javier Carrasco
2024-07-05 17:38 ` [PATCH 1/2] Input: qt1050 - constify " Javier Carrasco
2024-07-05 17:38 ` [PATCH 2/2] Input: fsl-imx25-tcq " Javier Carrasco
2024-07-08 17:11 ` [PATCH 0/2] Input - constify read-only " Dmitry Torokhov
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).