From: Krzysztof Kozlowski Date: Thu, 29 Jul 2021 10:40:15 +0000 (+0200) Subject: nfc: virtual_ncidev: constify pointer to nfc_dev X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=83428dbbac514f33597e6c8c571969027b3fac82;p=linux.git nfc: virtual_ncidev: constify pointer to nfc_dev virtual_ncidev_ioctl() does not modify struct nfc_dev, so local variable can be a pointer to const. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller --- diff --git a/drivers/nfc/virtual_ncidev.c b/drivers/nfc/virtual_ncidev.c index b914ab2c21095..2ee0ec4bb7394 100644 --- a/drivers/nfc/virtual_ncidev.c +++ b/drivers/nfc/virtual_ncidev.c @@ -170,7 +170,7 @@ static int virtual_ncidev_close(struct inode *inode, struct file *file) static long virtual_ncidev_ioctl(struct file *flip, unsigned int cmd, unsigned long arg) { - struct nfc_dev *nfc_dev = ndev->nfc_dev; + const struct nfc_dev *nfc_dev = ndev->nfc_dev; void __user *p = (void __user *)arg; if (cmd != IOCTL_GET_NCIDEV_IDX)