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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4de1cdb commit 36dbe45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)