summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-10-18 14:24:37 +0200
committerMark Brown <broonie@kernel.org>2024-10-18 18:44:41 +0100
commit36dbe4521a381fd4d2561a90200ae4a2a3efb222 (patch)
tree7b8a8fa97634bd4758dc3ca72c6ae9603091b112 /drivers/spi
parent4de1cdb3c299bb98d70198c1fa20c71f0893835c (diff)
spi: make class structs const
The two instances of struct class are only used here in functions that take const pointers and so can too be made constant. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20241018122437.64275-1-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7c5e76b15421..5528c46edd0e 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2926,7 +2926,7 @@ static void spi_controller_release(struct device *dev)
kfree(ctlr);
}
-static struct class spi_master_class = {
+static const struct class spi_master_class = {
.name = "spi_master",
.dev_release = spi_controller_release,
.dev_groups = spi_master_groups,
@@ -3016,7 +3016,7 @@ static const struct attribute_group *spi_slave_groups[] = {
NULL,
};
-static struct class spi_slave_class = {
+static const struct class spi_slave_class = {
.name = "spi_slave",
.dev_release = spi_controller_release,
.dev_groups = spi_slave_groups,