aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2016-07-11 05:27:29 -0400
committerThierry Reding <thierry.reding@gmail.com>2016-07-11 06:49:31 -0400
commit4f57f5a01fcb4ec9d98e274837c0cd853d447da3 (patch)
treebc3790b50358211224ba00798888da6ed2ad5b0c
parente17c0b2258834b88bdaa282a30e125071d9325fc (diff)
pwm: tegra: Rename mmio_base to regs
The former is much longer to type and is ambiguous because the value stored in the field is not the (physical) base address of the memory- mapped I/O registers, but the virtual address of those registers as mapped through the MMU. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r--drivers/pwm/pwm-tegra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index ec5b79f08f17..3cbb32d8064f 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -42,7 +42,7 @@ struct tegra_pwm_chip {
42 42
43 struct clk *clk; 43 struct clk *clk;
44 44
45 void __iomem *mmio_base; 45 void __iomem *regs;
46}; 46};
47 47
48static inline struct tegra_pwm_chip *to_tegra_pwm_chip(struct pwm_chip *chip) 48static inline struct tegra_pwm_chip *to_tegra_pwm_chip(struct pwm_chip *chip)
@@ -52,13 +52,13 @@ static inline struct tegra_pwm_chip *to_tegra_pwm_chip(struct pwm_chip *chip)
52 52
53static inline u32 pwm_readl(struct tegra_pwm_chip *chip, unsigned int num) 53static inline u32 pwm_readl(struct tegra_pwm_chip *chip, unsigned int num)
54{ 54{
55 return readl(chip->mmio_base + (num << 4)); 55 return readl(chip->regs + (num << 4));
56} 56}
57 57
58static inline void pwm_writel(struct tegra_pwm_chip *chip, unsigned int num, 58static inline void pwm_writel(struct tegra_pwm_chip *chip, unsigned int num,
59 unsigned long val) 59 unsigned long val)
60{ 60{
61 writel(val, chip->mmio_base + (num << 4)); 61 writel(val, chip->regs + (num << 4));
62} 62}
63 63
64static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, 64static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -177,9 +177,9 @@ static int tegra_pwm_probe(struct platform_device *pdev)
177 pwm->dev = &pdev->dev; 177 pwm->dev = &pdev->dev;
178 178
179 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 179 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
180 pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); 180 pwm->regs = devm_ioremap_resource(&pdev->dev, r);
181 if (IS_ERR(pwm->mmio_base)) 181 if (IS_ERR(pwm->regs))
182 return PTR_ERR(pwm->mmio_base); 182 return PTR_ERR(pwm->regs);
183 183
184 platform_set_drvdata(pdev, pwm); 184 platform_set_drvdata(pdev, pwm);
185 185