diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-07-29 12:40:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-29 13:28:02 +0200 |
commit | dd8987a394c0730380167e0b0aebd766cf3511e1 (patch) | |
tree | 5f4e32463293ff1e0dc42568aede22d1494be948 /include/net/nfc | |
parent | Merge branch 'skb-gro-optimize' (diff) | |
download | linux-dd8987a394c0730380167e0b0aebd766cf3511e1.tar.xz linux-dd8987a394c0730380167e0b0aebd766cf3511e1.zip |
nfc: constify passed nfc_dev
The struct nfc_dev is not modified by nfc_get_drvdata() and
nfc_device_name() so it can be made a const.
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 85b698794b14..901779138e2b 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h @@ -245,7 +245,7 @@ static inline void nfc_set_drvdata(struct nfc_dev *dev, void *data) * * @dev: The nfc device */ -static inline void *nfc_get_drvdata(struct nfc_dev *dev) +static inline void *nfc_get_drvdata(const struct nfc_dev *dev) { return dev_get_drvdata(&dev->dev); } @@ -255,7 +255,7 @@ static inline void *nfc_get_drvdata(struct nfc_dev *dev) * * @dev: The nfc device whose name to return */ -static inline const char *nfc_device_name(struct nfc_dev *dev) +static inline const char *nfc_device_name(const struct nfc_dev *dev) { return dev_name(&dev->dev); } |