hamradio: baycom: make hdlcdrv_ops const
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 6 Aug 2017 08:51:45 +0000 (14:21 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 21:26:46 +0000 (14:26 -0700)
Make hdlcdrv_ops structures const as they are only passed to
hdlcdrv_register function. The corresponding argument is of type const,
so make the structures const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/baycom_par.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/hamradio/baycom_ser_hdx.c

index 92b13b39f426012e65cd19c5ccf7c9cb1107910f..e1783832d304b701d7bc007def77b347520c8234 100644 (file)
@@ -386,7 +386,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops par96_ops = {
+static const struct hdlcdrv_ops par96_ops = {
        .drvname = bc_drvname,
        .drvinfo = bc_drvinfo,
        .open    = par96_open,
index d9a646acca20423f56c4e8e22b9bd35cb8334734..190f66c8847979762eba06f01585788bcff02423 100644 (file)
@@ -508,7 +508,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops ser12_ops = {
+static const struct hdlcdrv_ops ser12_ops = {
        .drvname = bc_drvname,
        .drvinfo = bc_drvinfo,
        .open    = ser12_open,
index f1c8a9ff38914ebb9a88a95d7625071665029a0c..3c823c648cf5092e61d7ce3c8ecc0ecbf5d4f54e 100644 (file)
@@ -542,7 +542,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
 
 /* --------------------------------------------------------------------- */
 
-static struct hdlcdrv_ops ser12_ops = {
+static const struct hdlcdrv_ops ser12_ops = {
        .drvname = bc_drvname,
        .drvinfo = bc_drvinfo,
        .open    = ser12_open,