nfc: nfcsim: constify drvdata (struct nfcsim)
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 29 Jul 2021 10:40:16 +0000 (12:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jul 2021 11:28:03 +0000 (12:28 +0100)
nfcsim_abort_cmd() does not modify struct nfcsim, 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>
drivers/nfc/nfcsim.c

index 143dc49..1575467 100644 (file)
@@ -240,7 +240,7 @@ static int nfcsim_send(struct nfc_digital_dev *ddev, struct sk_buff *skb,
 
 static void nfcsim_abort_cmd(struct nfc_digital_dev *ddev)
 {
-       struct nfcsim *dev = nfc_digital_get_drvdata(ddev);
+       const struct nfcsim *dev = nfc_digital_get_drvdata(ddev);
 
        nfcsim_link_recv_cancel(dev->link_in);
 }