Skip to content

Commit

Permalink
net: atm: make atmdev_ops const
Browse files Browse the repository at this point in the history
Make these const as they are only stored in the ops field of a atm_dev
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
goyalbhumika authored and davem330 committed Aug 10, 2017
1 parent 46c4b7a commit 800bb47
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ static void atmarpd_close(struct atm_vcc *vcc)
module_put(THIS_MODULE);
}

static struct atmdev_ops atmarpd_dev_ops = {
static const struct atmdev_ops atmarpd_dev_ops = {
.close = atmarpd_close
};

Expand Down
2 changes: 1 addition & 1 deletion net/atm/lec.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static void lec_atm_close(struct atm_vcc *vcc)
module_put(THIS_MODULE);
}

static struct atmdev_ops lecdev_ops = {
static const struct atmdev_ops lecdev_ops = {
.close = lec_atm_close,
.send = lec_atm_send
};
Expand Down
2 changes: 1 addition & 1 deletion net/atm/mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
netif_rx(new_skb);
}

static struct atmdev_ops mpc_ops = { /* only send is required */
static const struct atmdev_ops mpc_ops = { /* only send is required */
.close = mpoad_close,
.send = msg_from_mpoad
};
Expand Down
2 changes: 1 addition & 1 deletion net/atm/signaling.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static void sigd_close(struct atm_vcc *vcc)
read_unlock(&vcc_sklist_lock);
}

static struct atmdev_ops sigd_dev_ops = {
static const struct atmdev_ops sigd_dev_ops = {
.close = sigd_close,
.send = sigd_send
};
Expand Down

0 comments on commit 800bb47

Please sign in to comment.