Skip to content

Commit

Permalink
powerpc/8xx: add __init to cpm1 init functions
Browse files Browse the repository at this point in the history
Functions cpm1_clk_setup(), cpm1_set_pin(), cpm_pic_init() and
mpc8xx_pic_init() are only called from __init functions, so mark
them __init as well.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c27168ef054f3a52edcf0ff91652700d53b3e32d.1568294563.git.christophe.leroy@c-s.fr
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Nov 19, 2019
1 parent b020aa9 commit 132f92f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/platforms/8xx/cpm1.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static const struct irq_domain_ops cpm_pic_host_ops = {
.map = cpm_pic_host_map,
};

unsigned int cpm_pic_init(void)
unsigned int __init cpm_pic_init(void)
{
struct device_node *np = NULL;
struct resource res;
Expand Down Expand Up @@ -306,7 +306,7 @@ struct cpm_ioport32e {
__be32 dir, par, sor, odr, dat;
};

static void cpm1_set_pin32(int port, int pin, int flags)
static void __init cpm1_set_pin32(int port, int pin, int flags)
{
struct cpm_ioport32e __iomem *iop;
pin = 1 << (31 - pin);
Expand Down Expand Up @@ -348,7 +348,7 @@ static void cpm1_set_pin32(int port, int pin, int flags)
}
}

static void cpm1_set_pin16(int port, int pin, int flags)
static void __init cpm1_set_pin16(int port, int pin, int flags)
{
struct cpm_ioport16 __iomem *iop =
(struct cpm_ioport16 __iomem *)&mpc8xx_immr->im_ioport;
Expand Down Expand Up @@ -386,15 +386,15 @@ static void cpm1_set_pin16(int port, int pin, int flags)
}
}

void cpm1_set_pin(enum cpm_port port, int pin, int flags)
void __init cpm1_set_pin(enum cpm_port port, int pin, int flags)
{
if (port == CPM_PORTB || port == CPM_PORTE)
cpm1_set_pin32(port, pin, flags);
else
cpm1_set_pin16(port, pin, flags);
}

int cpm1_clk_setup(enum cpm_clk_target target, int clock, int mode)
int __init cpm1_clk_setup(enum cpm_clk_target target, int clock, int mode)
{
int shift;
int i, bits = 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/8xx/pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static const struct irq_domain_ops mpc8xx_pic_host_ops = {
.xlate = mpc8xx_pic_host_xlate,
};

int mpc8xx_pic_init(void)
int __init mpc8xx_pic_init(void)
{
struct resource res;
struct device_node *np;
Expand Down

0 comments on commit 132f92f

Please sign in to comment.