Skip to content

Commit

Permalink
[ATM] he: Fix __init/__devinit conflict
Browse files Browse the repository at this point in the history
he_init_one() is declared __devinit, but calls lots of init functions
that are marked __init.  However, if CONFIG_HOTPLUG is enabled,
__devinit functions go into normal .text, which leads to

    WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2130) and 'he_service_tbrq'

Fix this by changing the __init functions to __devinit.

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roland Dreier authored and David S. Miller committed Sep 25, 2006
1 parent 76a081e commit 5b7c714
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ rate_to_atmf(unsigned rate) /* cps to atm forum format */
return (NONZERO | (exp << 9) | (rate & 0x1ff));
}

static void __init
static void __devinit
he_init_rx_lbfp0(struct he_dev *he_dev)
{
unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
Expand Down Expand Up @@ -485,7 +485,7 @@ he_init_rx_lbfp0(struct he_dev *he_dev)
he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C);
}

static void __init
static void __devinit
he_init_rx_lbfp1(struct he_dev *he_dev)
{
unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
Expand Down Expand Up @@ -516,7 +516,7 @@ he_init_rx_lbfp1(struct he_dev *he_dev)
he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C);
}

static void __init
static void __devinit
he_init_tx_lbfp(struct he_dev *he_dev)
{
unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
Expand Down Expand Up @@ -546,7 +546,7 @@ he_init_tx_lbfp(struct he_dev *he_dev)
he_writel(he_dev, lbufd_index - 1, TLBF_T);
}

static int __init
static int __devinit
he_init_tpdrq(struct he_dev *he_dev)
{
he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev,
Expand All @@ -568,7 +568,7 @@ he_init_tpdrq(struct he_dev *he_dev)
return 0;
}

static void __init
static void __devinit
he_init_cs_block(struct he_dev *he_dev)
{
unsigned clock, rate, delta;
Expand Down Expand Up @@ -664,7 +664,7 @@ he_init_cs_block(struct he_dev *he_dev)

}

static int __init
static int __devinit
he_init_cs_block_rcm(struct he_dev *he_dev)
{
unsigned (*rategrid)[16][16];
Expand Down Expand Up @@ -785,7 +785,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
return 0;
}

static int __init
static int __devinit
he_init_group(struct he_dev *he_dev, int group)
{
int i;
Expand Down Expand Up @@ -955,7 +955,7 @@ he_init_group(struct he_dev *he_dev, int group)
return 0;
}

static int __init
static int __devinit
he_init_irq(struct he_dev *he_dev)
{
int i;
Expand Down

0 comments on commit 5b7c714

Please sign in to comment.