nfc: pn533: Constify serdev_device_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 6 Oct 2021 22:47:37 +0000 (00:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Oct 2021 12:35:10 +0000 (13:35 +0100)
The only usage of pn532_serdev_ops is to pass its address to
serdev_device_set_client_ops(), which takes a pointer to const
serdev_device_ops as argument. Make it const to allow the compiler to
put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/pn533/uart.c

index 7bdaf826307064b252522fdcf5cd4c49d44a23ea..77bb073f031ac3ec872d4d248870c721aae58062 100644 (file)
@@ -224,7 +224,7 @@ static int pn532_receive_buf(struct serdev_device *serdev,
        return i;
 }
 
-static struct serdev_device_ops pn532_serdev_ops = {
+static const struct serdev_device_ops pn532_serdev_ops = {
        .receive_buf = pn532_receive_buf,
        .write_wakeup = serdev_device_write_wakeup,
 };