* [PATCH] hamradio: baycom: make hdlcdrv_ops const
@ 2017-08-06 8:51 Bhumika Goyal
2017-08-07 21:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-06 8:51 UTC (permalink / raw)
To: julia.lawall, t.sailer, linux-hams, netdev, linux-kernel; +Cc: Bhumika Goyal
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>
---
drivers/net/hamradio/baycom_par.c | 2 +-
drivers/net/hamradio/baycom_ser_fdx.c | 2 +-
drivers/net/hamradio/baycom_ser_hdx.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
index 92b13b3..e178383 100644
--- a/drivers/net/hamradio/baycom_par.c
+++ b/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,
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index d9a646a..190f66c 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/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,
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
index f1c8a9f..3c823c6 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/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,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hamradio: baycom: make hdlcdrv_ops const
2017-08-06 8:51 [PATCH] hamradio: baycom: make hdlcdrv_ops const Bhumika Goyal
@ 2017-08-07 21:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-07 21:26 UTC (permalink / raw)
To: bhumirks; +Cc: julia.lawall, t.sailer, linux-hams, netdev, linux-kernel
From: Bhumika Goyal <bhumirks@gmail.com>
Date: Sun, 6 Aug 2017 14:21:45 +0530
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-07 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-06 8:51 [PATCH] hamradio: baycom: make hdlcdrv_ops const Bhumika Goyal
2017-08-07 21:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).