net: bridge: constify the struct device_type usage
Since commit aed65af1cc ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the br_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 <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7e0acba3b4
commit
bbc7e4cc21
@@ -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",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user