mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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 <krzysztof.kozlowski@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ea050c5ee7
commit
83428dbbac
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user