summaryrefslogtreecommitdiff
path: root/include/net/nfc
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-25 00:49:25 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-25 11:21:21 +0300
commitf6c802a726aea43a2937763f13560c1fd170fae6 (patch)
tree7a5026123ebe12da9ef83b8c85c1d993c043c41a /include/net/nfc
parent5f3e63933793fff15ae3b968f1c03698bdd3fc66 (diff)
downloadlinux-f6c802a726aea43a2937763f13560c1fd170fae6.tar.xz
nfc: constify nfc_ops
Neither the core nor the drivers modify the passed pointer to struct nfc_ops, 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')
-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 31672021d071..85b698794b14 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -191,14 +191,14 @@ struct nfc_dev {
const struct nfc_vendor_cmd *vendor_cmds;
int n_vendor_cmds;
- struct nfc_ops *ops;
+ const struct nfc_ops *ops;
struct genl_info *cur_cmd_info;
};
#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev)
extern struct class nfc_class;
-struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
+struct nfc_dev *nfc_allocate_device(const struct nfc_ops *ops,
u32 supported_protocols,
int tx_headroom,
int tx_tailroom);