Skip to content

Commit

Permalink
ARM: tegra: tegra_powergate_is_powered should be static
Browse files Browse the repository at this point in the history
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: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Olof Johansson committed Oct 13, 2011
1 parent b28fba2 commit 784278e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-tegra/include/mach/powergate.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

int tegra_powergate_power_on(int id);
int tegra_powergate_power_off(int id);
bool tegra_powergate_is_powered(int id);
int tegra_powergate_remove_clamping(int id);

/* Must be called with clk disabled, and returns with clk enabled */
Expand Down
5 changes: 2 additions & 3 deletions arch/arm/mach-tegra/powergate.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ int tegra_powergate_power_off(int id)
return tegra_powergate_set(id, false);
}

bool tegra_powergate_is_powered(int id)
static bool tegra_powergate_is_powered(int id)
{
u32 status;

if (id < 0 || id >= TEGRA_NUM_POWERGATE)
return -EINVAL;
WARN_ON(id < 0 || id >= TEGRA_NUM_POWERGATE);

status = pmc_read(PWRGATE_STATUS) & (1 << id);
return !!status;
Expand Down

0 comments on commit 784278e

Please sign in to comment.