atm: fix horizon init section usage
Subsystems (3)
PATCH 1/1 atm: fix horizon init section usage
From: Randy Dunlap <[email protected]>
hrz_init() is called from the probe function, which is __devinit and could be called after init.
WARNING: drivers/atm/horizon.o - Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset 0x4054) and '.hrz_remove_one'
---
drivers/atm/horizon.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/atm/horizon.c renamed from drivers/atm/horizon.c~atm_hrz_section +2 -1
@@ -1845,7 +1845,8 @@ static u16 __init read_bia (const hrz_de/********** initialise a card **********/ -static int __init hrz_init (hrz_dev * dev) { +static int hrz_init (hrz_dev * dev) +{int onefivefive;u16 chan;
---
David Miller
maintainerFrom: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700
Quoted 8 lines
From: Randy Dunlap <[email protected]>
hrz_init()is called from the probe function, which is__devinitand could be called after init.WARNING:
drivers/atm/horizon.o- Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset0x4054) and '.hrz_remove_one'Signed-off-by Randy Dunlap <[email protected]>
It is only called from hrz_init() and thus shouldn't it be thus marked __devinit as well? That seems to be the right way to fix this one.
Quoted 8 lines · David Miller
From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700Quoted 5 lines
From: Randy Dunlap <[email protected]>
hrz_init()is called from the probe function, which is__devinitand could be called after init.
Quoted 7 lines
Quoted 3 lines
WARNING:
drivers/atm/horizon.o- Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset0x4054) and '.hrz_remove_one'Signed-off-by Randy Dunlap <[email protected]>It is only called from
hrz_init()and thus shouldn't it be thus marked__devinitas well? That seems to be the right way to fix this one.
Oops, I agree. Want me to send another patch?
Signature · 1 line
~Randy
David Miller
maintainerFrom: "Randy.Dunlap" <[email protected]>
Date: Sun, 22 Oct 2006 21:32:20 -0700
Quoted 11 lines
Quoted 10 lines · David Miller
From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700Quoted 7 lines
From: Randy Dunlap <[email protected]>
hrz_init()is called from the probe function, which is__devinitand could be called after init.WARNING:
drivers/atm/horizon.o- Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset0x4054) and '.hrz_remove_one'
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Randy Dunlap <[email protected]>It is only called from
hrz_init()and thus shouldn't it be thus marked__devinitas well? That seems to be the right way to fix this one.Oops, I agree. Want me to send another patch?
No need, I'll take care of it, thanks Randy.
Quoted 14 lines · David Miller
From: "Randy.Dunlap" <[email protected]>
Date: Sun, 22 Oct 2006 21:32:20 -0700Quoted 11 lines
Quoted 10 lines · David Miller
From: Randy Dunlap <[email protected]>
Date: Sun, 22 Oct 2006 19:13:09 -0700Quoted 7 lines
From: Randy Dunlap <[email protected]>
hrz_init()is called from the probe function, which is__devinitand could be called after init.WARNING:
drivers/atm/horizon.o- Section mismatch: reference to .init.text:.hrz_init from .text between '.hrz_probe' (at offset0x4054) and '.hrz_remove_one'
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Randy Dunlap <[email protected]>It is only called from
hrz_init()and thus shouldn't it be thus marked__devinitas well? That seems to be the right way to fix this one.Oops, I agree. Want me to send another patch?
No need, I'll take care of it, thanks Randy.
David,
FYI: read_bia() also needs to be changed from __init to __devinit since it's called from hrz_init().
Signature · 1 line
~Randy
David Miller
maintainerFrom: "Randy.Dunlap" <[email protected]>
Date: Mon, 23 Oct 2006 09:31:50 -0700
Quoted 2 lines
FYI:
read_bia()also needs to be changed from__initto__devinitsince it's called fromhrz_init().
Thanks Randy, I've fixed this up in my tree too.