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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}