lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  1 Aug 2013 17:52:05 -0700
From:	Julius Werner <jwerner@...omium.org>
To:	Felipe Balbi <balbi@...com>
Cc:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	linux-samsung-soc@...r.kernel.org,
	Tomasz Figa <t.figa@...sung.com>,
	Vivek Gautam <gautam.vivek@...sung.com>,
	devicetree@...r.kernel.org,
	Sylwester Nawrocki <sylvester.nawrocki@...il.com>,
	Julius Werner <jwerner@...omium.org>
Subject: [PATCH 2/3] usb: phy-samsung-usb: trivial: rename pmuregs variable

Now that the sphy->pmuregs variable always points to only a single
register, let's rename it to make that more clear.

Signed-off-by: Julius Werner <jwerner@...omium.org>
---
 drivers/usb/phy/phy-samsung-usb.c  | 14 +++++++-------
 drivers/usb/phy/phy-samsung-usb.h  |  4 ++--
 drivers/usb/phy/phy-samsung-usb2.c |  4 ++--
 drivers/usb/phy/phy-samsung-usb3.c |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/phy/phy-samsung-usb.c b/drivers/usb/phy/phy-samsung-usb.c
index 51cad19..fa382c9 100644
--- a/drivers/usb/phy/phy-samsung-usb.c
+++ b/drivers/usb/phy/phy-samsung-usb.c
@@ -42,9 +42,9 @@ int samsung_usbphy_parse_dt(struct samsung_usbphy *sphy)
 		return -ENODEV;
 	}
 
-	sphy->pmuregs = of_iomap(usbphy_sys, 0);
+	sphy->pmureg = of_iomap(usbphy_sys, 0);
 
-	if (sphy->pmuregs == NULL) {
+	if (sphy->pmureg == NULL) {
 		dev_err(sphy->dev, "Can't get usb-phy pmu control register\n");
 		goto err0;
 	}
@@ -77,23 +77,23 @@ void samsung_usbphy_set_isolation_4210(struct samsung_usbphy *sphy, bool on)
 {
 	u32 reg_val;
 
-	if (!sphy->pmuregs) {
+	if (!sphy->pmureg) {
 		dev_warn(sphy->dev, "Can't set pmu isolation\n");
 		return;
 	}
 
-	reg_val = readl(sphy->pmuregs);
+	reg_val = readl(sphy->pmureg);
 
 	if (on)
 		reg_val &= ~sphy->drv_data->phy_en_mask;
 	else
 		reg_val |= sphy->drv_data->phy_en_mask;
 
-	writel(reg_val, sphy->pmuregs);
+	writel(reg_val, sphy->pmureg);
 
 	if (sphy->drv_data->cpu_type == TYPE_EXYNOS4X12) {
-		writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL0);
-		writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL1);
+		writel(reg_val, sphy->pmureg + EXYNOS4X12_PHY_HSIC_CTRL0);
+		writel(reg_val, sphy->pmureg + EXYNOS4X12_PHY_HSIC_CTRL1);
 	}
 }
 EXPORT_SYMBOL_GPL(samsung_usbphy_set_isolation_4210);
diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h
index a817af5..f2e9c4a 100644
--- a/drivers/usb/phy/phy-samsung-usb.h
+++ b/drivers/usb/phy/phy-samsung-usb.h
@@ -281,7 +281,7 @@ struct samsung_usbphy_drvdata {
  * @dev: The parent device supplied to the probe function
  * @clk: usb phy clock
  * @regs: usb phy controller registers memory base
- * @pmuregs: USB device PHY_CONTROL register memory base
+ * @pmureg: USB device PHY_CONTROL register address
  * @sysreg: USB2.0 PHY_CFG register memory base
  * @ref_clk_freq: reference clock frequency selection
  * @drv_data: driver data available for different SoCs
@@ -296,7 +296,7 @@ struct samsung_usbphy {
 	struct device	*dev;
 	struct clk	*clk;
 	void __iomem	*regs;
-	void __iomem	*pmuregs;
+	void __iomem	*pmureg;
 	void __iomem	*sysreg;
 	int		ref_clk_freq;
 	const struct samsung_usbphy_drvdata *drv_data;
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c
index adbaa8c..c2c83d4 100644
--- a/drivers/usb/phy/phy-samsung-usb2.c
+++ b/drivers/usb/phy/phy-samsung-usb2.c
@@ -435,8 +435,8 @@ static int samsung_usb2phy_remove(struct platform_device *pdev)
 
 	usb_remove_phy(&sphy->phy);
 
-	if (sphy->pmuregs)
-		iounmap(sphy->pmuregs);
+	if (sphy->pmureg)
+		iounmap(sphy->pmureg);
 	if (sphy->sysreg)
 		iounmap(sphy->sysreg);
 
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c
index 3ad9579..6259a35 100644
--- a/drivers/usb/phy/phy-samsung-usb3.c
+++ b/drivers/usb/phy/phy-samsung-usb3.c
@@ -292,8 +292,8 @@ static int samsung_usb3phy_remove(struct platform_device *pdev)
 
 	usb_remove_phy(&sphy->phy);
 
-	if (sphy->pmuregs)
-		iounmap(sphy->pmuregs);
+	if (sphy->pmureg)
+		iounmap(sphy->pmureg);
 	if (sphy->sysreg)
 		iounmap(sphy->sysreg);
 
-- 
1.7.12.4

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ