drm/tegra: dsi: Use unsigned int for register offsets
authorThierry Reding <treding@nvidia.com>
Tue, 15 Aug 2017 13:41:07 +0000 (15:41 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 17 Aug 2017 15:57:13 +0000 (17:57 +0200)
Register offsets are usually fairly small numbers, so an unsigned int is
more than enough to represent them.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dsi.c

index 3dea1216bafdcc1f07deb5222b98ec08bd5578fa..444664b92fbb5ff9d6144c74a49cbf4f14e01321 100644 (file)
@@ -105,15 +105,15 @@ static struct tegra_dsi_state *tegra_dsi_get_state(struct tegra_dsi *dsi)
        return to_dsi_state(dsi->output.connector.state);
 }
 
-static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned long reg)
+static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned int offset)
 {
-       return readl(dsi->regs + (reg << 2));
+       return readl(dsi->regs + (offset << 2));
 }
 
 static inline void tegra_dsi_writel(struct tegra_dsi *dsi, u32 value,
-                                   unsigned long reg)
+                                   unsigned int offset)
 {
-       writel(value, dsi->regs + (reg << 2));
+       writel(value, dsi->regs + (offset << 2));
 }
 
 static int tegra_dsi_show_regs(struct seq_file *s, void *data)