From: Rikard Falkeborn Date: Wed, 26 Aug 2020 22:56:03 +0000 (+0200) Subject: net: ethernet: qualcomm: constify qca_serdev_ops X-Git-Tag: v5.15~2655^2~428^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=715d08712e9a3fa008ed15cacd39830709962181;p=platform%2Fkernel%2Flinux-starfive.git net: ethernet: qualcomm: constify qca_serdev_ops 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/qualcomm/qca_uart.c b/drivers/net/ethernet/qualcomm/qca_uart.c index 375a844..362b4f5 100644 --- a/drivers/net/ethernet/qualcomm/qca_uart.c +++ b/drivers/net/ethernet/qualcomm/qca_uart.c @@ -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, };