From: Rikard Falkeborn Date: Mon, 9 Nov 2020 21:58:44 +0000 (+0100) Subject: phy: tegra: Constify static device_type structs X-Git-Tag: v5.15~2217^2~40^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86f1a6e6c5f700f27bbee046ad330b6a50707a24;p=platform%2Fkernel%2Flinux-starfive.git 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: Rikard Falkeborn Link: https://lore.kernel.org/r/20201109215844.167954-1-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul --- diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index 067e713..ea9d930 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -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, };