]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ethernet: qualcomm: constify qca_serdev_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 26 Aug 2020 22:56:03 +0000 (00:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 23:21:17 +0000 (16:21 -0700)
The only usage of qca_serdev_ops is to pass its address to
serdev_device_set_client_ops() which takes a const pointer. 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/net/ethernet/qualcomm/qca_uart.c

index 375a844cd27cf288dab8252ebb8b11ddaa1d0da8..362b4f5c162c08573f7103e71acb751774b50792 100644 (file)
@@ -167,7 +167,7 @@ static void qca_tty_wakeup(struct serdev_device *serdev)
        schedule_work(&qca->tx_work);
 }
 
-static struct serdev_device_ops qca_serdev_ops = {
+static const struct serdev_device_ops qca_serdev_ops = {
        .receive_buf = qca_tty_receive,
        .write_wakeup = qca_tty_wakeup,
 };