Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1184394

Re: [PATCH] phy: Constify struct phy_ops variables

From Patrice Chotard <patrice.chotard@st.com>
Newsgroups linux.kernel
Subject Re: [PATCH] phy: Constify struct phy_ops variables
Date 2015-07-15 09:50 +0200
Message-ID <pMpC2-X9-5@gated-at.bofh.it> (permalink)
References <pMpsm-LG-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Axel

On 07/15/2015 09:33 AM, Axel Lin wrote:
> The phy_ops variables are never modified after initialized in these
> drivers, so make them const.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> Note, the change for drivers/phy/phy-tusb1210.c depends on
> my previous patch "[PATCH] phy: ulpi_phy: Add const qualifier to ops".
>
>   drivers/phy/phy-armada375-usb2.c    | 2 +-
>   drivers/phy/phy-bcm-kona-usb2.c     | 2 +-
>   drivers/phy/phy-berlin-sata.c       | 2 +-
>   drivers/phy/phy-berlin-usb.c        | 2 +-
>   drivers/phy/phy-brcmstb-sata.c      | 2 +-
>   drivers/phy/phy-dm816x-usb.c        | 2 +-
>   drivers/phy/phy-exynos-dp-video.c   | 2 +-
>   drivers/phy/phy-exynos-mipi-video.c | 2 +-
>   drivers/phy/phy-exynos5-usbdrd.c    | 2 +-
>   drivers/phy/phy-exynos5250-sata.c   | 2 +-
>   drivers/phy/phy-hix5hd2-sata.c      | 2 +-
>   drivers/phy/phy-miphy28lp.c         | 2 +-
>   drivers/phy/phy-miphy365x.c         | 2 +-
>   drivers/phy/phy-mvebu-sata.c        | 2 +-
>   drivers/phy/phy-omap-usb2.c         | 2 +-
>   drivers/phy/phy-qcom-apq8064-sata.c | 2 +-
>   drivers/phy/phy-qcom-ipq806x-sata.c | 2 +-
>   drivers/phy/phy-qcom-ufs-i.h        | 2 +-
>   drivers/phy/phy-qcom-ufs-qmp-14nm.c | 2 +-
>   drivers/phy/phy-qcom-ufs-qmp-20nm.c | 2 +-
>   drivers/phy/phy-qcom-ufs.c          | 2 +-
>   drivers/phy/phy-rcar-gen2.c         | 2 +-
>   drivers/phy/phy-rockchip-usb.c      | 2 +-
>   drivers/phy/phy-samsung-usb2.c      | 2 +-
>   drivers/phy/phy-spear1310-miphy.c   | 2 +-
>   drivers/phy/phy-spear1340-miphy.c   | 2 +-
>   drivers/phy/phy-stih41x-usb.c       | 2 +-
>   drivers/phy/phy-sun4i-usb.c         | 2 +-
>   drivers/phy/phy-sun9i-usb.c         | 2 +-
>   drivers/phy/phy-ti-pipe3.c          | 2 +-
>   drivers/phy/phy-tusb1210.c          | 2 +-
>   31 files changed, 31 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/phy/phy-armada375-usb2.c b/drivers/phy/phy-armada375-usb2.c
> index 8ccc395..a3f1e73 100644
> --- a/drivers/phy/phy-armada375-usb2.c
> +++ b/drivers/phy/phy-armada375-usb2.c
> @@ -51,7 +51,7 @@ static int armada375_usb_phy_init(struct phy *phy)
>   	return 0;
>   }
>   
[snip]
>   
> -static struct phy_ops phy_ops = {
> +static const struct phy_ops phy_ops = {
>   	.power_on = tusb1210_power_on,
>   	.power_off = tusb1210_power_off,
>   	.owner = THIS_MODULE,

for
drivers/phy/phy-miphy28lp.c,
drivers/phy/phy-miphy365x.c and
drivers/phy/phy-stih41x-usb.c

Acked-by: Patrice Chotard <patrice.chotard@st.com>

Thanks


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] phy: Constify struct phy_ops variables Axel Lin <axel.lin@ingics.com> - 2015-07-15 09:40 +0200
  Re: [PATCH] phy: Constify struct phy_ops variables Patrice Chotard <patrice.chotard@st.com> - 2015-07-15 09:50 +0200

csiph-web