From: Rikard Falkeborn Date: Wed, 30 Mar 2022 22:32:52 +0000 (+0200) Subject: Bluetooth: btintel: Constify static struct regmap_bus X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bf7380e224f98a29ff6290beb2ea026f0a044a8c;p=linux.git Bluetooth: btintel: Constify static struct regmap_bus The only usage of regmap_ibt is to (after the regmap_init() macro is expanded), pass its address to __regmap_init(), which takes a pointer to const struct regmap_bus as input. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 06514ed660229..818681c89db8b 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -794,7 +794,7 @@ static void regmap_ibt_free_context(void *context) kfree(context); } -static struct regmap_bus regmap_ibt = { +static const struct regmap_bus regmap_ibt = { .read = regmap_ibt_read, .write = regmap_ibt_write, .gather_write = regmap_ibt_gather_write,