From be5f60d8b6f9611ff3a687de5d47d3ed9fb2cfb0 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Thu, 7 Oct 2021 00:47:37 +0200 Subject: [PATCH] nfc: pn533: Constify serdev_device_ops 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 Signed-off-by: David S. Miller --- drivers/nfc/pn533/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/pn533/uart.c b/drivers/nfc/pn533/uart.c index 7bdaf82630706..77bb073f031ac 100644 --- a/drivers/nfc/pn533/uart.c +++ b/drivers/nfc/pn533/uart.c @@ -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, }; -- 2.30.2