summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2016-07-11 11:27:29 +0200
committerThierry Reding <thierry.reding@gmail.com>2016-07-11 12:49:31 +0200
commit4f57f5a01fcb4ec9d98e274837c0cd853d447da3 (patch)
treebc3790b50358211224ba00798888da6ed2ad5b0c /drivers/pwm
parente17c0b2258834b88bdaa282a30e125071d9325fc (diff)
downloadlwn-4f57f5a01fcb4ec9d98e274837c0cd853d447da3.tar.gz
lwn-4f57f5a01fcb4ec9d98e274837c0cd853d447da3.zip
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>
Diffstat (limited to 'drivers/pwm')
-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 {
struct clk *clk;
- void __iomem *mmio_base;
+ void __iomem *regs;
};
static 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)
static inline u32 pwm_readl(struct tegra_pwm_chip *chip, unsigned int num)
{
- return readl(chip->mmio_base + (num << 4));
+ return readl(chip->regs + (num << 4));
}
static inline void pwm_writel(struct tegra_pwm_chip *chip, unsigned int num,
unsigned long val)
{
- writel(val, chip->mmio_base + (num << 4));
+ writel(val, chip->regs + (num << 4));
}
static 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)
pwm->dev = &pdev->dev;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
- if (IS_ERR(pwm->mmio_base))
- return PTR_ERR(pwm->mmio_base);
+ pwm->regs = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(pwm->regs))
+ return PTR_ERR(pwm->regs);
platform_set_drvdata(pdev, pwm);