Commit 46c4b7a5 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by David S. Miller

atm: make atmdev_ops const

Make these structures const as they are either passed to the function
atm_dev_register having the corresponding argument as const or stored in
the ops field of a atm_dev structure, which is also const.
Done using Coccinelle.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d78d6776
...@@ -130,7 +130,7 @@ adummy_proc_read(struct atm_dev *dev, loff_t *pos, char *page) ...@@ -130,7 +130,7 @@ adummy_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
return 0; return 0;
} }
static struct atmdev_ops adummy_ops = static const struct atmdev_ops adummy_ops =
{ {
.open = adummy_open, .open = adummy_open,
.close = adummy_close, .close = adummy_close,
......
...@@ -342,7 +342,7 @@ static struct atmdev_ops atmtcp_v_dev_ops = { ...@@ -342,7 +342,7 @@ static struct atmdev_ops atmtcp_v_dev_ops = {
*/ */
static struct atmdev_ops atmtcp_c_dev_ops = { static const struct atmdev_ops atmtcp_c_dev_ops = {
.close = atmtcp_c_close, .close = atmtcp_c_close,
.send = atmtcp_c_send .send = atmtcp_c_send
}; };
......
...@@ -161,7 +161,7 @@ static unsigned int clocktab[] = { ...@@ -161,7 +161,7 @@ static unsigned int clocktab[] = {
CLK_LOW CLK_LOW
}; };
static struct atmdev_ops he_ops = static const struct atmdev_ops he_ops =
{ {
.open = he_open, .open = he_open,
.close = he_close, .close = he_close,
......
...@@ -134,7 +134,7 @@ static int idt77252_proc_read(struct atm_dev *dev, loff_t * pos, ...@@ -134,7 +134,7 @@ static int idt77252_proc_read(struct atm_dev *dev, loff_t * pos,
static void idt77252_softint(struct work_struct *work); static void idt77252_softint(struct work_struct *work);
static struct atmdev_ops idt77252_ops = static const struct atmdev_ops idt77252_ops =
{ {
.dev_close = idt77252_dev_close, .dev_close = idt77252_dev_close,
.open = idt77252_open, .open = idt77252_open,
......
...@@ -154,7 +154,7 @@ static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr); ...@@ -154,7 +154,7 @@ static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
static struct ns_dev *cards[NS_MAX_CARDS]; static struct ns_dev *cards[NS_MAX_CARDS];
static unsigned num_cards; static unsigned num_cards;
static struct atmdev_ops atm_ops = { static const struct atmdev_ops atm_ops = {
.open = ns_open, .open = ns_open,
.close = ns_close, .close = ns_close,
.ioctl = ns_ioctl, .ioctl = ns_ioctl,
......
...@@ -1187,7 +1187,7 @@ static int psend(struct atm_vcc *vcc, struct sk_buff *skb) ...@@ -1187,7 +1187,7 @@ static int psend(struct atm_vcc *vcc, struct sk_buff *skb)
return 0; return 0;
} }
static struct atmdev_ops fpga_ops = { static const struct atmdev_ops fpga_ops = {
.open = popen, .open = popen,
.close = pclose, .close = pclose,
.ioctl = NULL, .ioctl = NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment