Commit b0117d13 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-constify-device_type'

Ricardo B. Marliere says:

====================
net: constify struct device_type usage

This is a simple and straight forward cleanup series that makes all device
types in the net subsystem constants. This has been possible since 2011 [1]
but not all occurrences were cleaned. I have been sweeping the tree to fix
them all.

I was not sure if I should send these squashed, but there are quite a few
changes so I decided to send them separately. Please let me know if that is
not desirable.

[1] https://lore.kernel.org/all/1305850262-9575-5-git-send-email-gregkh@suse.de/

====================

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
parents 2f3bfa8e 55fad9c4
......@@ -1142,7 +1142,7 @@ static const struct ethtool_ops geneve_ethtool_ops = {
};
/* Info for udev, that this is a virtual tunnel endpoint */
static struct device_type geneve_type = {
static const struct device_type geneve_type = {
.name = "geneve",
};
......
......@@ -129,7 +129,7 @@ static void nsim_bus_dev_release(struct device *dev)
complete(&nsim_bus_devs_released);
}
static struct device_type nsim_bus_dev_type = {
static const struct device_type nsim_bus_dev_type = {
.groups = nsim_bus_dev_attr_groups,
.release = nsim_bus_dev_release,
};
......
......@@ -1607,7 +1607,7 @@ static const struct net_device_ops ppp_netdev_ops = {
.ndo_fill_forward_path = ppp_fill_forward_path,
};
static struct device_type ppp_type = {
static const struct device_type ppp_type = {
.name = "ppp",
};
......
......@@ -2465,7 +2465,7 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
}
}
static struct device_type hso_type = {
static const struct device_type hso_type = {
.name = "wwan",
};
......
......@@ -1654,11 +1654,11 @@ static const struct net_device_ops usbnet_netdev_ops = {
// precondition: never called in_interrupt
static struct device_type wlan_type = {
static const struct device_type wlan_type = {
.name = "wlan",
};
static struct device_type wwan_type = {
static const struct device_type wwan_type = {
.name = "wwan",
};
......
......@@ -3254,7 +3254,7 @@ static const struct net_device_ops vxlan_netdev_raw_ops = {
};
/* Info for udev, that this is a virtual tunnel endpoint */
static struct device_type vxlan_type = {
static const struct device_type vxlan_type = {
.name = "vxlan",
};
......
......@@ -920,7 +920,7 @@ static int wwan_rtnl_validate(struct nlattr *tb[], struct nlattr *data[],
return 0;
}
static struct device_type wwan_type = { .name = "wwan" };
static const struct device_type wwan_type = { .name = "wwan" };
static struct net_device *wwan_rtnl_alloc(struct nlattr *tb[],
const char *ifname,
......
......@@ -537,7 +537,7 @@ static const struct header_ops vlan_passthru_header_ops = {
.parse_protocol = vlan_parse_protocol,
};
static struct device_type vlan_type = {
static const struct device_type vlan_type = {
.name = "vlan",
};
......
......@@ -474,7 +474,7 @@ static const struct net_device_ops br_netdev_ops = {
.ndo_fill_forward_path = br_fill_forward_path,
};
static struct device_type br_type = {
static const struct device_type br_type = {
.name = "bridge",
};
......
......@@ -2429,7 +2429,7 @@ static const struct net_device_ops dsa_user_netdev_ops = {
.ndo_fill_forward_path = dsa_user_fill_forward_path,
};
static struct device_type dsa_type = {
static const struct device_type dsa_type = {
.name = "dsa",
};
......
......@@ -467,7 +467,7 @@ static const struct net_device_ops hsr_device_ops = {
.ndo_set_rx_mode = hsr_set_rx_mode,
};
static struct device_type hsr_type = {
static const struct device_type hsr_type = {
.name = "hsr",
};
......
......@@ -100,7 +100,7 @@ static const struct net_device_ops l2tp_eth_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};
static struct device_type l2tpeth_type = {
static const struct device_type l2tpeth_type = {
.name = "l2tpeth",
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment