提交 784278e1 编写于 作者: O Olof Johansson

ARM: tegra: tegra_powergate_is_powered should be static

Not exported and not used externally.

Also, fix return type. Due to new return type, errors can't be returned
so WARN_ON instead of returning error if a bad parameter is specified.
Signed-off-by: NOlof Johansson <olof@lixom.net>
Acked-by: NStephen Warren <swarren@nvidia.com>
Acked-by: NArnd Bergmann <arnd@arndb.de>
上级 b28fba2a
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
int tegra_powergate_power_on(int id); int tegra_powergate_power_on(int id);
int tegra_powergate_power_off(int id); int tegra_powergate_power_off(int id);
bool tegra_powergate_is_powered(int id);
int tegra_powergate_remove_clamping(int id); int tegra_powergate_remove_clamping(int id);
/* Must be called with clk disabled, and returns with clk enabled */ /* Must be called with clk disabled, and returns with clk enabled */
......
...@@ -89,12 +89,11 @@ int tegra_powergate_power_off(int id) ...@@ -89,12 +89,11 @@ int tegra_powergate_power_off(int id)
return tegra_powergate_set(id, false); return tegra_powergate_set(id, false);
} }
bool tegra_powergate_is_powered(int id) static bool tegra_powergate_is_powered(int id)
{ {
u32 status; u32 status;
if (id < 0 || id >= TEGRA_NUM_POWERGATE) WARN_ON(id < 0 || id >= TEGRA_NUM_POWERGATE);
return -EINVAL;
status = pmc_read(PWRGATE_STATUS) & (1 << id); status = pmc_read(PWRGATE_STATUS) & (1 << id);
return !!status; return !!status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册