From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>, Vinod Koul <vkoul@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Yu Chen <chenyu56@huawei.com>,
Binghui Wang <wangbinghui@hisilicon.com>,
linux-usb@vger.kernel.org
Subject: [PATCH 3/8] phy: hisilicon; Constify hi3660_phy_ops
Date: Mon, 24 Aug 2020 00:00:20 +0200 [thread overview]
Message-ID: <20200823220025.17588-4-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200823220025.17588-1-rikard.falkeborn@gmail.com>
The only usage is to pass its address to devm_phy_create() which takes a
const pointer. Make it const to allow the compiler to put it in
read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/phy/hisilicon/phy-hi3660-usb3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/hisilicon/phy-hi3660-usb3.c b/drivers/phy/hisilicon/phy-hi3660-usb3.c
index cc0af2c044d0..84adce9b4277 100644
--- a/drivers/phy/hisilicon/phy-hi3660-usb3.c
+++ b/drivers/phy/hisilicon/phy-hi3660-usb3.c
@@ -161,7 +161,7 @@ static int hi3660_phy_exit(struct phy *phy)
return ret;
}
-static struct phy_ops hi3660_phy_ops = {
+static const struct phy_ops hi3660_phy_ops = {
.init = hi3660_phy_init,
.exit = hi3660_phy_exit,
.owner = THIS_MODULE,
--
2.28.0
next prev parent reply other threads:[~2020-08-23 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-23 22:00 [PATCH 0/8] drivers: phy: Constify static phy_ops structs Rikard Falkeborn
2020-08-23 22:00 ` Rikard Falkeborn [this message]
2020-08-23 22:07 ` Joe Perches
2020-08-31 9:06 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200823220025.17588-4-rikard.falkeborn@gmail.com \
--to=rikard.falkeborn@gmail.com \
--cc=chenyu56@huawei.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vkoul@kernel.org \
--cc=wangbinghui@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox