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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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,
};
+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+1 −1
Original line number Diff line number Diff line
@@ -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",
};

+2 −2
Original line number Diff line number Diff line
@@ -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",
};

Loading