Bluetooth: Constify bt_register_starage parameters
There is no need for struct bt_storage being modified by stack. Change-Id: I732cf94983a29de40d692e802d6a71b8986708df Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
bd3043dc00
commit
31912bcb23
|
@ -43,7 +43,7 @@ static bt_le_scan_cb_t *scan_dev_found_cb;
|
|||
|
||||
struct nble nble;
|
||||
|
||||
static struct bt_storage *storage;
|
||||
static const struct bt_storage *storage;
|
||||
|
||||
#define BT_SMP_IO_DISPLAY_ONLY 0x00
|
||||
#define BT_SMP_IO_DISPLAY_YESNO 0x01
|
||||
|
@ -552,7 +552,7 @@ void on_nble_up(void)
|
|||
send_dm_config();
|
||||
}
|
||||
|
||||
void bt_storage_register(struct bt_storage *bt_storage)
|
||||
void bt_storage_register(const struct bt_storage *bt_storage)
|
||||
{
|
||||
storage = bt_storage;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ struct bt_storage {
|
|||
|
||||
};
|
||||
|
||||
void bt_storage_register(struct bt_storage *storage);
|
||||
void bt_storage_register(const struct bt_storage *storage);
|
||||
|
||||
/** Clear all storage keys for a specific address
|
||||
*
|
||||
|
|
|
@ -3724,7 +3724,7 @@ int bt_br_set_discoverable(bool enable)
|
|||
}
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
|
||||
void bt_storage_register(struct bt_storage *storage)
|
||||
void bt_storage_register(const struct bt_storage *storage)
|
||||
{
|
||||
bt_storage = storage;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue