hamradio: baycom: make hdlcdrv_ops const
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- 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(-)
drivers/net/hamradio/baycom_par.c +1 -1
@@ -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,
drivers/net/hamradio/baycom_ser_fdx.c +1 -1
@@ -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,
drivers/net/hamradio/baycom_ser_hdx.c +1 -1
@@ -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,
Signature · 1 line
1.9.1
From: Bhumika Goyal <[email protected]>
Date: Sun, 6 Aug 2017 14:21:45 +0530
Quoted 5 lines
Make
hdlcdrv_opsstructures const as they are only passed tohdlcdrv_registerfunction. The corresponding argument is of type const, so make the structures const.Signed-off-by Bhumika Goyal <[email protected]>
Applied, thanks.