mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
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>
This commit is contained in:
parent
8cb79af5c6
commit
dd8987a394
@ -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)
|
|||||||
*
|
*
|
||||||
* @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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user