summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw88/util.c
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2022-07-27 14:52:32 +0800
committerKalle Valo <kvalo@kernel.org>2022-08-09 08:48:59 +0300
commitdcbf179cbc18f66976740d28fbcfab75be514d16 (patch)
tree4ee45ec9cc4ade41ee976cc2899b20d50d0a8e32 /drivers/net/wireless/realtek/rtw88/util.c
parent86331c7e0cd819bf0c1d0dcf895e0c90b0aa9a6f (diff)
downloadlwn-dcbf179cbc18f66976740d28fbcfab75be514d16.tar.gz
lwn-dcbf179cbc18f66976740d28fbcfab75be514d16.zip
wifi: rtw88: access chip_info by const pointer
Since chip_info has became const table, we must access them via const pointer to avoid invalid writing. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220727065232.28510-1-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/util.c')
-rw-r--r--drivers/net/wireless/realtek/rtw88/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c
index 2c515af214e7..cdfd66a85075 100644
--- a/drivers/net/wireless/realtek/rtw88/util.c
+++ b/drivers/net/wireless/realtek/rtw88/util.c
@@ -23,7 +23,7 @@ EXPORT_SYMBOL(check_hw_ready);
bool ltecoex_read_reg(struct rtw_dev *rtwdev, u16 offset, u32 *val)
{
- struct rtw_chip_info *chip = rtwdev->chip;
+ const struct rtw_chip_info *chip = rtwdev->chip;
const struct rtw_ltecoex_addr *ltecoex = chip->ltecoex_addr;
if (!check_hw_ready(rtwdev, ltecoex->ctrl, LTECOEX_READY, 1))
@@ -37,7 +37,7 @@ bool ltecoex_read_reg(struct rtw_dev *rtwdev, u16 offset, u32 *val)
bool ltecoex_reg_write(struct rtw_dev *rtwdev, u16 offset, u32 value)
{
- struct rtw_chip_info *chip = rtwdev->chip;
+ const struct rtw_chip_info *chip = rtwdev->chip;
const struct rtw_ltecoex_addr *ltecoex = chip->ltecoex_addr;
if (!check_hw_ready(rtwdev, ltecoex->ctrl, LTECOEX_READY, 1))