Commit dd8987a3 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by David S. Miller

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8cb79af5
...@@ -245,7 +245,7 @@ static inline void nfc_set_drvdata(struct nfc_dev *dev, void *data) ...@@ -245,7 +245,7 @@ static inline void nfc_set_drvdata(struct nfc_dev *dev, void *data)
* *
* @dev: The nfc device * @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); return dev_get_drvdata(&dev->dev);
} }
...@@ -255,7 +255,7 @@ static inline void *nfc_get_drvdata(struct nfc_dev *dev) ...@@ -255,7 +255,7 @@ static inline void *nfc_get_drvdata(struct nfc_dev *dev)
* *
* @dev: The nfc device whose name to return * @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); return dev_name(&dev->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment