summaryrefslogtreecommitdiffstats
path: root/include/net/nfc/nfc.h
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-24 23:49:23 +0200
committerDavid S. Miller <davem@davemloft.net>2021-07-25 09:21:21 +0100
commit15944ad2e5a1cc2ef2c6fa60b04e464dbb4ddb61 (patch)
tree1e6eaa905b18ddca5743a5f3b4b758d937dfe83e /include/net/nfc/nfc.h
parent0f20ae9bb96be60f50d51feb37f1435dac5687ea (diff)
downloadlinux-stable-15944ad2e5a1cc2ef2c6fa60b04e464dbb4ddb61.tar.gz
linux-stable-15944ad2e5a1cc2ef2c6fa60b04e464dbb4ddb61.tar.bz2
linux-stable-15944ad2e5a1cc2ef2c6fa60b04e464dbb4ddb61.zip
nfc: constify pointer to nfc_vendor_cmd
Neither the core nor the drivers modify the passed pointer to struct nfc_vendor_cmd, so make it a pointer to const for correctness and safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/nfc/nfc.h')
-rw-r--r--include/net/nfc/nfc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 2cd3a261bcbc..31672021d071 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -188,7 +188,7 @@ struct nfc_dev {
struct rfkill *rfkill;
- struct nfc_vendor_cmd *vendor_cmds;
+ const struct nfc_vendor_cmd *vendor_cmds;
int n_vendor_cmds;
struct nfc_ops *ops;
@@ -297,7 +297,7 @@ void nfc_send_to_raw_sock(struct nfc_dev *dev, struct sk_buff *skb,
u8 payload_type, u8 direction);
static inline int nfc_set_vendor_cmds(struct nfc_dev *dev,
- struct nfc_vendor_cmd *cmds,
+ const struct nfc_vendor_cmd *cmds,
int n_cmds)
{
if (dev->vendor_cmds || dev->n_vendor_cmds)