Skip to content

Commit

Permalink
net: l2tp: constify the struct device_type usage
Browse files Browse the repository at this point in the history
Since commit aed65af ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the l2tpeth_type
variable to be a constant structure as well, placing it into read-only
memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Ricardo B. Marliere <[email protected]>
Reviewed-by: Guillaume Nault <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
rbmarliere authored and davem330 committed Feb 21, 2024
1 parent 0072b2c commit 43820fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};

Expand Down

0 comments on commit 43820fd

Please sign in to comment.