From: Bartosz Golaszewski Date: Fri, 18 Oct 2024 12:24:37 +0000 (+0200) Subject: spi: make class structs const X-Git-Tag: v6.13-rc1~158^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36dbe4521a381fd4d2561a90200ae4a2a3efb222;p=thirdparty%2Fkernel%2Fstable.git 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 Link: https://patch.msgid.link/20241018122437.64275-1-brgl@bgdev.pl Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 7c5e76b154212..5528c46edd0ea 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,