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>
This commit is contained in:
Krzysztof Kozlowski
2021-07-24 23:49:23 +02:00
committed by David S. Miller
parent 0f20ae9bb9
commit 15944ad2e5
6 changed files with 7 additions and 7 deletions

View File

@@ -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)