diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-10 19:12:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-11 01:22:16 +0300 |
commit | 171a7000fa94c7ed30720357bc0b9e8d277d15e5 (patch) | |
tree | c6ce0eb1fb44109c12a89783d61e33703b6116ac /drivers/nfc/s3fwrn5/firmware.c | |
parent | 4aa62c62d4c41d71b2bda5ed01b78961829ee93c (diff) | |
download | linux-171a7000fa94c7ed30720357bc0b9e8d277d15e5.tar.xz |
nfc: s3fwrn5: Constify s3fwrn5_fw_info when not modified
Two functions accept pointer to struct s3fwrn5_fw_info but do not
modify the contents. Make them const so the code is a little bit safer.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/s3fwrn5/firmware.c')
-rw-r--r-- | drivers/nfc/s3fwrn5/firmware.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c index 69857f080704..ec930ee2c847 100644 --- a/drivers/nfc/s3fwrn5/firmware.c +++ b/drivers/nfc/s3fwrn5/firmware.c @@ -348,7 +348,7 @@ static int s3fwrn5_fw_get_base_addr( } static inline bool -s3fwrn5_fw_is_custom(struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo) +s3fwrn5_fw_is_custom(const struct s3fwrn5_fw_cmd_get_bootinfo_rsp *bootinfo) { return !!bootinfo->hw_version[2]; } @@ -399,7 +399,7 @@ err: return ret; } -bool s3fwrn5_fw_check_version(struct s3fwrn5_fw_info *fw_info, u32 version) +bool s3fwrn5_fw_check_version(const struct s3fwrn5_fw_info *fw_info, u32 version) { struct s3fwrn5_fw_version *new = (void *) &fw_info->fw.version; struct s3fwrn5_fw_version *old = (void *) &version; |