Commit 8fe70a5f7167e02bbc18086970f0e92a5e55b80d
Committed by
Ben Dooks
1 parent
165f5f6419
Exists in
master
and in
39 other branches
ARM: S3C24XX: serial: Fix section mismatch warnings
During kernel build process, the following warning was found: WARNING: drivers/serial/built-in.o(.data+0x304): Section mismatch in reference from the variable s3c2440_serial_drv to the function .devexit.text:s3c24xx_serial_remove() The variable s3c2440_serial_drv references the function __devexit s3c24xx_serial_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, The same warning happened for s3c241x platform. We rename variables to avoid these warnings. These changes also apply to s3c2400 & s3c24a0 for consistency. Signed-off-by: Ramax Lo <ramaxlo@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Showing 5 changed files with 20 additions and 20 deletions Side-by-side Diff
drivers/serial/s3c2400.c
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | return s3c24xx_serial_probe(dev, &s3c2400_uart_inf); |
77 | 77 | } |
78 | 78 | |
79 | -static struct platform_driver s3c2400_serial_drv = { | |
79 | +static struct platform_driver s3c2400_serial_driver = { | |
80 | 80 | .probe = s3c2400_serial_probe, |
81 | 81 | .remove = __devexit_p(s3c24xx_serial_remove), |
82 | 82 | .driver = { |
83 | 83 | |
84 | 84 | |
... | ... | @@ -85,16 +85,16 @@ |
85 | 85 | }, |
86 | 86 | }; |
87 | 87 | |
88 | -s3c24xx_console_init(&s3c2400_serial_drv, &s3c2400_uart_inf); | |
88 | +s3c24xx_console_init(&s3c2400_serial_driver, &s3c2400_uart_inf); | |
89 | 89 | |
90 | 90 | static inline int s3c2400_serial_init(void) |
91 | 91 | { |
92 | - return s3c24xx_serial_init(&s3c2400_serial_drv, &s3c2400_uart_inf); | |
92 | + return s3c24xx_serial_init(&s3c2400_serial_driver, &s3c2400_uart_inf); | |
93 | 93 | } |
94 | 94 | |
95 | 95 | static inline void s3c2400_serial_exit(void) |
96 | 96 | { |
97 | - platform_driver_unregister(&s3c2400_serial_drv); | |
97 | + platform_driver_unregister(&s3c2400_serial_driver); | |
98 | 98 | } |
99 | 99 | |
100 | 100 | module_init(s3c2400_serial_init); |
drivers/serial/s3c2410.c
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | return s3c24xx_serial_probe(dev, &s3c2410_uart_inf); |
89 | 89 | } |
90 | 90 | |
91 | -static struct platform_driver s3c2410_serial_drv = { | |
91 | +static struct platform_driver s3c2410_serial_driver = { | |
92 | 92 | .probe = s3c2410_serial_probe, |
93 | 93 | .remove = __devexit_p(s3c24xx_serial_remove), |
94 | 94 | .driver = { |
95 | 95 | |
96 | 96 | |
... | ... | @@ -97,16 +97,16 @@ |
97 | 97 | }, |
98 | 98 | }; |
99 | 99 | |
100 | -s3c24xx_console_init(&s3c2410_serial_drv, &s3c2410_uart_inf); | |
100 | +s3c24xx_console_init(&s3c2410_serial_driver, &s3c2410_uart_inf); | |
101 | 101 | |
102 | 102 | static int __init s3c2410_serial_init(void) |
103 | 103 | { |
104 | - return s3c24xx_serial_init(&s3c2410_serial_drv, &s3c2410_uart_inf); | |
104 | + return s3c24xx_serial_init(&s3c2410_serial_driver, &s3c2410_uart_inf); | |
105 | 105 | } |
106 | 106 | |
107 | 107 | static void __exit s3c2410_serial_exit(void) |
108 | 108 | { |
109 | - platform_driver_unregister(&s3c2410_serial_drv); | |
109 | + platform_driver_unregister(&s3c2410_serial_driver); | |
110 | 110 | } |
111 | 111 | |
112 | 112 | module_init(s3c2410_serial_init); |
drivers/serial/s3c2412.c
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | return s3c24xx_serial_probe(dev, &s3c2412_uart_inf); |
122 | 122 | } |
123 | 123 | |
124 | -static struct platform_driver s3c2412_serial_drv = { | |
124 | +static struct platform_driver s3c2412_serial_driver = { | |
125 | 125 | .probe = s3c2412_serial_probe, |
126 | 126 | .remove = __devexit_p(s3c24xx_serial_remove), |
127 | 127 | .driver = { |
128 | 128 | |
129 | 129 | |
... | ... | @@ -130,16 +130,16 @@ |
130 | 130 | }, |
131 | 131 | }; |
132 | 132 | |
133 | -s3c24xx_console_init(&s3c2412_serial_drv, &s3c2412_uart_inf); | |
133 | +s3c24xx_console_init(&s3c2412_serial_driver, &s3c2412_uart_inf); | |
134 | 134 | |
135 | 135 | static inline int s3c2412_serial_init(void) |
136 | 136 | { |
137 | - return s3c24xx_serial_init(&s3c2412_serial_drv, &s3c2412_uart_inf); | |
137 | + return s3c24xx_serial_init(&s3c2412_serial_driver, &s3c2412_uart_inf); | |
138 | 138 | } |
139 | 139 | |
140 | 140 | static inline void s3c2412_serial_exit(void) |
141 | 141 | { |
142 | - platform_driver_unregister(&s3c2412_serial_drv); | |
142 | + platform_driver_unregister(&s3c2412_serial_driver); | |
143 | 143 | } |
144 | 144 | |
145 | 145 | module_init(s3c2412_serial_init); |
drivers/serial/s3c2440.c
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); |
152 | 152 | } |
153 | 153 | |
154 | -static struct platform_driver s3c2440_serial_drv = { | |
154 | +static struct platform_driver s3c2440_serial_driver = { | |
155 | 155 | .probe = s3c2440_serial_probe, |
156 | 156 | .remove = __devexit_p(s3c24xx_serial_remove), |
157 | 157 | .driver = { |
158 | 158 | |
159 | 159 | |
... | ... | @@ -160,16 +160,16 @@ |
160 | 160 | }, |
161 | 161 | }; |
162 | 162 | |
163 | -s3c24xx_console_init(&s3c2440_serial_drv, &s3c2440_uart_inf); | |
163 | +s3c24xx_console_init(&s3c2440_serial_driver, &s3c2440_uart_inf); | |
164 | 164 | |
165 | 165 | static int __init s3c2440_serial_init(void) |
166 | 166 | { |
167 | - return s3c24xx_serial_init(&s3c2440_serial_drv, &s3c2440_uart_inf); | |
167 | + return s3c24xx_serial_init(&s3c2440_serial_driver, &s3c2440_uart_inf); | |
168 | 168 | } |
169 | 169 | |
170 | 170 | static void __exit s3c2440_serial_exit(void) |
171 | 171 | { |
172 | - platform_driver_unregister(&s3c2440_serial_drv); | |
172 | + platform_driver_unregister(&s3c2440_serial_driver); | |
173 | 173 | } |
174 | 174 | |
175 | 175 | module_init(s3c2440_serial_init); |
drivers/serial/s3c24a0.c
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | return s3c24xx_serial_probe(dev, &s3c24a0_uart_inf); |
93 | 93 | } |
94 | 94 | |
95 | -static struct platform_driver s3c24a0_serial_drv = { | |
95 | +static struct platform_driver s3c24a0_serial_driver = { | |
96 | 96 | .probe = s3c24a0_serial_probe, |
97 | 97 | .remove = __devexit_p(s3c24xx_serial_remove), |
98 | 98 | .driver = { |
99 | 99 | |
100 | 100 | |
... | ... | @@ -101,16 +101,16 @@ |
101 | 101 | }, |
102 | 102 | }; |
103 | 103 | |
104 | -s3c24xx_console_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); | |
104 | +s3c24xx_console_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf); | |
105 | 105 | |
106 | 106 | static int __init s3c24a0_serial_init(void) |
107 | 107 | { |
108 | - return s3c24xx_serial_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); | |
108 | + return s3c24xx_serial_init(&s3c24a0_serial_driver, &s3c24a0_uart_inf); | |
109 | 109 | } |
110 | 110 | |
111 | 111 | static void __exit s3c24a0_serial_exit(void) |
112 | 112 | { |
113 | - platform_driver_unregister(&s3c24a0_serial_drv); | |
113 | + platform_driver_unregister(&s3c24a0_serial_driver); | |
114 | 114 | } |
115 | 115 | |
116 | 116 | module_init(s3c24a0_serial_init); |