Skip to content

Commit

Permalink
atm: atmtcp: Constify atmtcp_v_dev_ops
Browse files Browse the repository at this point in the history
The only usage of atmtcp_v_dev_ops is to pass its address to
atm_dev_register() which takes a pointer to const, and comparing its
address to another address, which does not modify it. 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>
  • Loading branch information
Rikard Falkeborn authored and David S. Miller committed Sep 28, 2020
1 parent e5f7e21 commit 7028977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/atm/atmtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
*/


static struct atmdev_ops atmtcp_v_dev_ops = {
static const struct atmdev_ops atmtcp_v_dev_ops = {
.dev_close = atmtcp_v_dev_close,
.open = atmtcp_v_open,
.close = atmtcp_v_close,
Expand Down

0 comments on commit 7028977

Please sign in to comment.