提交 bf7380e2 编写于 作者: R Rikard Falkeborn 提交者: Marcel Holtmann

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: NRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 31396dd5
...@@ -794,7 +794,7 @@ static void regmap_ibt_free_context(void *context) ...@@ -794,7 +794,7 @@ static void regmap_ibt_free_context(void *context)
kfree(context); kfree(context);
} }
static struct regmap_bus regmap_ibt = { static const struct regmap_bus regmap_ibt = {
.read = regmap_ibt_read, .read = regmap_ibt_read,
.write = regmap_ibt_write, .write = regmap_ibt_write,
.gather_write = regmap_ibt_gather_write, .gather_write = regmap_ibt_gather_write,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册