Skip to content

Commit 36dbe45

Browse files
Bartosz Golaszewskibroonie
authored andcommitted
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>
1 parent 4de1cdb commit 36dbe45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/spi/spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,7 +2926,7 @@ static void spi_controller_release(struct device *dev)
29262926
kfree(ctlr);
29272927
}
29282928

2929-
static struct class spi_master_class = {
2929+
static const struct class spi_master_class = {
29302930
.name = "spi_master",
29312931
.dev_release = spi_controller_release,
29322932
.dev_groups = spi_master_groups,
@@ -3016,7 +3016,7 @@ static const struct attribute_group *spi_slave_groups[] = {
30163016
NULL,
30173017
};
30183018

3019-
static struct class spi_slave_class = {
3019+
static const struct class spi_slave_class = {
30203020
.name = "spi_slave",
30213021
.dev_release = spi_controller_release,
30223022
.dev_groups = spi_slave_groups,

0 commit comments

Comments
 (0)