Skip to content

Commit 75a69ac

Browse files
Samuel Ortizdavem330
authored andcommitted
[IrDA]: Fix IrDA build failure
When having built-in IrDA, we hit the following error: `irda_sysctl_unregister' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irda_proc_unregister' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irsock_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irttp_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `iriap_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irda_device_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irlap_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o `irlmp_cleanup' referenced in section `.init.text' of net/built-in.o: defined in discarded section `.exit.text' of net/built-in.o make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [_all] Error 2 This is due to the irda_init fix recently added, where we call __exit routines from an __init one. It is a build failure that I didn't catch because it doesn't show up when building IrDA as a module. My apologies for that. The following patch fixes that failure and is against your net-2.6 tree. I hope it can make it to the merge window, and [email protected] is CCed on this mail. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 83ca46e commit 75a69ac

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

net/irda/af_irda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,7 @@ int __init irsock_init(void)
25672567
* Remove IrDA protocol
25682568
*
25692569
*/
2570-
void __exit irsock_cleanup(void)
2570+
void irsock_cleanup(void)
25712571
{
25722572
sock_unregister(PF_IRDA);
25732573
proto_unregister(&irda_proto);

net/irda/irda_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ int __init irda_device_init( void)
9595
return 0;
9696
}
9797

98-
static void __exit leftover_dongle(void *arg)
98+
static void leftover_dongle(void *arg)
9999
{
100100
struct dongle_reg *reg = arg;
101101
IRDA_WARNING("IrDA: Dongle type %x not unregistered\n",
102102
reg->type);
103103
}
104104

105-
void __exit irda_device_cleanup(void)
105+
void irda_device_cleanup(void)
106106
{
107107
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
108108

net/irda/iriap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int __init iriap_init(void)
153153
* Initializes the IrIAP layer, called by the module cleanup code in
154154
* irmod.c
155155
*/
156-
void __exit iriap_cleanup(void)
156+
void iriap_cleanup(void)
157157
{
158158
irlmp_unregister_service(service_handle);
159159

net/irda/irlap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int __init irlap_init(void)
9595
return 0;
9696
}
9797

98-
void __exit irlap_cleanup(void)
98+
void irlap_cleanup(void)
9999
{
100100
IRDA_ASSERT(irlap != NULL, return;);
101101

net/irda/irlmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int __init irlmp_init(void)
116116
* Remove IrLMP layer
117117
*
118118
*/
119-
void __exit irlmp_cleanup(void)
119+
void irlmp_cleanup(void)
120120
{
121121
/* Check for main structure */
122122
IRDA_ASSERT(irlmp != NULL, return;);

net/irda/irproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void __init irda_proc_register(void)
8484
* Unregister irda entry in /proc file system
8585
*
8686
*/
87-
void __exit irda_proc_unregister(void)
87+
void irda_proc_unregister(void)
8888
{
8989
int i;
9090

net/irda/irsysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ int __init irda_sysctl_register(void)
287287
* Unregister our sysctl interface
288288
*
289289
*/
290-
void __exit irda_sysctl_unregister(void)
290+
void irda_sysctl_unregister(void)
291291
{
292292
unregister_sysctl_table(irda_table_header);
293293
}

net/irda/irttp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int __init irttp_init(void)
109109
* Called by module destruction/cleanup code
110110
*
111111
*/
112-
void __exit irttp_cleanup(void)
112+
void irttp_cleanup(void)
113113
{
114114
/* Check for main structure */
115115
IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;);

0 commit comments

Comments
 (0)