summaryrefslogtreecommitdiff
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-09-29 22:45:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-05 13:58:17 +0300
commitc608dc105bd4533be8fd532a82f9c1fe5f0b121f (patch)
tree1f5d7737211dd53e8aa1f2fd0c7cacd055fec72e /drivers/usb/class
parent8c9e880bb98cba546ffaf97b85c5111f0aa86f79 (diff)
downloadlinux-c608dc105bd4533be8fd532a82f9c1fe5f0b121f.tar.xz
usb: cdc-wdm: Constify static struct wwan_port_ops
The only usage of wdm_wwan_port_ops is to pass its address to wwan_create_port() which takes a pointer to const wwan_port_ops as argument. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20210929194547.46954-3-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 35d5908b5478..3896656a9b6e 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -911,7 +911,7 @@ static int wdm_wwan_port_tx(struct wwan_port *port, struct sk_buff *skb)
return rv;
}
-static struct wwan_port_ops wdm_wwan_port_ops = {
+static const struct wwan_port_ops wdm_wwan_port_ops = {
.start = wdm_wwan_port_start,
.stop = wdm_wwan_port_stop,
.tx = wdm_wwan_port_tx,