Commit 624deb39 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Simon Horman

ARM: shmobile: R-Car: Make struct rcar_sysc_ch * parameters const

The passed struct rcar_sysc_ch is never modified, so it can be const.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 2f575fcf
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
static void __iomem *rcar_sysc_base; static void __iomem *rcar_sysc_base;
static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */ static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch, static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch,
int sr_bit, int reg_offs) int sr_bit, int reg_offs)
{ {
int k; int k;
...@@ -73,18 +73,18 @@ static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch, ...@@ -73,18 +73,18 @@ static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch,
return 0; return 0;
} }
static int rcar_sysc_pwr_off(struct rcar_sysc_ch *sysc_ch) static int rcar_sysc_pwr_off(const struct rcar_sysc_ch *sysc_ch)
{ {
return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_POFFENB, PWROFFCR_OFFS); return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_POFFENB, PWROFFCR_OFFS);
} }
static int rcar_sysc_pwr_on(struct rcar_sysc_ch *sysc_ch) static int rcar_sysc_pwr_on(const struct rcar_sysc_ch *sysc_ch)
{ {
return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_PONENB, PWRONCR_OFFS); return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_PONENB, PWRONCR_OFFS);
} }
static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch, static int rcar_sysc_update(const struct rcar_sysc_ch *sysc_ch,
int (*on_off_fn)(struct rcar_sysc_ch *)) int (*on_off_fn)(const struct rcar_sysc_ch *))
{ {
unsigned int isr_mask = 1 << sysc_ch->isr_bit; unsigned int isr_mask = 1 << sysc_ch->isr_bit;
unsigned int chan_mask = 1 << sysc_ch->chan_bit; unsigned int chan_mask = 1 << sysc_ch->chan_bit;
...@@ -136,17 +136,17 @@ static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch, ...@@ -136,17 +136,17 @@ static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch,
return ret; return ret;
} }
int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch) int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch)
{ {
return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_off); return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_off);
} }
int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch) int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch)
{ {
return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_on); return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_on);
} }
bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch) bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
{ {
unsigned int st; unsigned int st;
......
...@@ -7,9 +7,9 @@ struct rcar_sysc_ch { ...@@ -7,9 +7,9 @@ struct rcar_sysc_ch {
u8 isr_bit; u8 isr_bit;
}; };
int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch);
int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch);
bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch);
void __iomem *rcar_sysc_init(phys_addr_t base); void __iomem *rcar_sysc_init(phys_addr_t base);
#endif /* PM_RCAR_H */ #endif /* PM_RCAR_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment