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>
This commit is contained in:
Bartosz Golaszewski 2024-10-18 14:24:37 +02:00 committed by Mark Brown
parent 4de1cdb3c2
commit 36dbe4521a
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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,