]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
atm: make atmdev_ops const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 9 Aug 2017 09:19:15 +0000 (14:49 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Aug 2017 05:43:50 +0000 (22:43 -0700)
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: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/adummy.c
drivers/atm/atmtcp.c
drivers/atm/he.c
drivers/atm/idt77252.c
drivers/atm/nicstar.c
drivers/atm/solos-pci.c

index da27ddfa75a7fd0bb9eebe0029079f51a5182b7b..8d98130ecd405fb2f5d41cea8d04cf3fea38deca 100644 (file)
@@ -130,7 +130,7 @@ adummy_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
        return 0;
 }
 
-static struct atmdev_ops adummy_ops =
+static const struct atmdev_ops adummy_ops =
 {
        .open =         adummy_open,
        .close =        adummy_close,   
index 56fa16c85ebf8a9f24f26c658337c4d8ae1351e0..afebeb1c3e1e9fea29741fe61d83b980bc1e31de 100644 (file)
@@ -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,
        .send           = atmtcp_c_send
 };
index 8f6156d475d1c60fb531092b721827f28a3b5dc2..e58538c29377710ed6f0a1b83883c1b8db91e41b 100644 (file)
@@ -161,7 +161,7 @@ static unsigned int clocktab[] = {
        CLK_LOW
 };     
 
-static struct atmdev_ops he_ops =
+static const struct atmdev_ops he_ops =
 {
        .open =         he_open,
        .close =        he_close,       
index b7a168c466923dcd05e96886d3589974f74d8bdf..47f3c4ae05947f9c98080fa637ef747b84fcf836 100644 (file)
@@ -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 struct atmdev_ops idt77252_ops =
+static const struct atmdev_ops idt77252_ops =
 {
        .dev_close      = idt77252_dev_close,
        .open           = idt77252_open,
index 9588d80f318ee0f454061152055950e6720aed31..a9702836cbaeb10b233c6e1b7b818e527f2d1542 100644 (file)
@@ -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 unsigned num_cards;
-static struct atmdev_ops atm_ops = {
+static const struct atmdev_ops atm_ops = {
        .open = ns_open,
        .close = ns_close,
        .ioctl = ns_ioctl,
index 8754793223cd15144f82d67c4525dc18905d95e0..0df1a1c80b00126e7d6083de7a51328758d4742b 100644 (file)
@@ -1187,7 +1187,7 @@ static int psend(struct atm_vcc *vcc, struct sk_buff *skb)
        return 0;
 }
 
-static struct atmdev_ops fpga_ops = {
+static const struct atmdev_ops fpga_ops = {
        .open =         popen,
        .close =        pclose,
        .ioctl =        NULL,