瀏覽代碼

hamradio: baycom: make hdlcdrv_ops const

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>
Bhumika Goyal 8 年之前
父節點
當前提交
511aeaf466
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      drivers/net/hamradio/baycom_par.c
  2. 1 1
      drivers/net/hamradio/baycom_ser_fdx.c
  3. 1 1
      drivers/net/hamradio/baycom_ser_hdx.c

+ 1 - 1
drivers/net/hamradio/baycom_par.c

@@ -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,

+ 1 - 1
drivers/net/hamradio/baycom_ser_fdx.c

@@ -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,

+ 1 - 1
drivers/net/hamradio/baycom_ser_hdx.c

@@ -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,