Commit 86f1a6e6 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Vinod Koul

phy: tegra: Constify static device_type structs

The only usage of tegra_xusb_pad_type and tegra_xusb_port_type is to
assign their address to the type field in the device struct, which is a
const pointer. Make them const to allow the compiler to put them in
read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201109215844.167954-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 3cc8e867
......@@ -146,7 +146,7 @@ static void tegra_xusb_pad_release(struct device *dev)
pad->soc->ops->remove(pad);
}
static struct device_type tegra_xusb_pad_type = {
static const struct device_type tegra_xusb_pad_type = {
.release = tegra_xusb_pad_release,
};
......@@ -513,7 +513,7 @@ static void tegra_xusb_port_release(struct device *dev)
port->ops->release(port);
}
static struct device_type tegra_xusb_port_type = {
static const struct device_type tegra_xusb_port_type = {
.release = tegra_xusb_port_release,
};
......
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