diff options
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | 2012-06-12 13:46:43 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-06-13 03:03:24 -0400 |
commit | 33a264ddcded2120fc0baa7afe4bcc5b4df3c416 (patch) | |
tree | dc04c6e89f00a27b4dd213cd322b034b4d96462f /arch/arm/mach-imx | |
parent | cfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff) |
ARM: imx: cleanup otg_mode
Cleanup the code for the otg_mode command line param:
* Use the bool type as it applies here.
* Qualify otg_mode_host with __initdata since this variable is only used in this
context.
* The __setup functions are not supposed to return a status code, but a boolean
indicating whether the param has been handled. See obsolete_checksetup() in
init/main.c.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx27.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx35.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx51sd.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx31_3ds.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx35_3ds.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx51_babbage.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm037.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm043.c | 8 |
11 files changed, 44 insertions, 44 deletions
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index d085aea08709..dbbb97074876 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -233,18 +233,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
233 | .phy_mode = FSL_USB2_PHY_ULPI, | 233 | .phy_mode = FSL_USB2_PHY_ULPI, |
234 | }; | 234 | }; |
235 | 235 | ||
236 | static int otg_mode_host; | 236 | static bool otg_mode_host __initdata; |
237 | 237 | ||
238 | static int __init eukrea_cpuimx27_otg_mode(char *options) | 238 | static int __init eukrea_cpuimx27_otg_mode(char *options) |
239 | { | 239 | { |
240 | if (!strcmp(options, "host")) | 240 | if (!strcmp(options, "host")) |
241 | otg_mode_host = 1; | 241 | otg_mode_host = true; |
242 | else if (!strcmp(options, "device")) | 242 | else if (!strcmp(options, "device")) |
243 | otg_mode_host = 0; | 243 | otg_mode_host = false; |
244 | else | 244 | else |
245 | pr_info("otg_mode neither \"host\" nor \"device\". " | 245 | pr_info("otg_mode neither \"host\" nor \"device\". " |
246 | "Defaulting to device\n"); | 246 | "Defaulting to device\n"); |
247 | return 0; | 247 | return 1; |
248 | } | 248 | } |
249 | __setup("otg_mode=", eukrea_cpuimx27_otg_mode); | 249 | __setup("otg_mode=", eukrea_cpuimx27_otg_mode); |
250 | 250 | ||
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index c515f8ede1a1..c754adc2bd50 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -142,18 +142,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
142 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | 142 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static int otg_mode_host; | 145 | static bool otg_mode_host __initdata; |
146 | 146 | ||
147 | static int __init eukrea_cpuimx35_otg_mode(char *options) | 147 | static int __init eukrea_cpuimx35_otg_mode(char *options) |
148 | { | 148 | { |
149 | if (!strcmp(options, "host")) | 149 | if (!strcmp(options, "host")) |
150 | otg_mode_host = 1; | 150 | otg_mode_host = true; |
151 | else if (!strcmp(options, "device")) | 151 | else if (!strcmp(options, "device")) |
152 | otg_mode_host = 0; | 152 | otg_mode_host = false; |
153 | else | 153 | else |
154 | pr_info("otg_mode neither \"host\" nor \"device\". " | 154 | pr_info("otg_mode neither \"host\" nor \"device\". " |
155 | "Defaulting to device\n"); | 155 | "Defaulting to device\n"); |
156 | return 0; | 156 | return 1; |
157 | } | 157 | } |
158 | __setup("otg_mode=", eukrea_cpuimx35_otg_mode); | 158 | __setup("otg_mode=", eukrea_cpuimx35_otg_mode); |
159 | 159 | ||
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c index ac50f1671e38..2e3243ee899d 100644 --- a/arch/arm/mach-imx/mach-cpuimx51sd.c +++ b/arch/arm/mach-imx/mach-cpuimx51sd.c | |||
@@ -218,18 +218,18 @@ static const struct mxc_usbh_platform_data usbh1_config __initconst = { | |||
218 | .portsc = MXC_EHCI_MODE_ULPI, | 218 | .portsc = MXC_EHCI_MODE_ULPI, |
219 | }; | 219 | }; |
220 | 220 | ||
221 | static int otg_mode_host; | 221 | static bool otg_mode_host __initdata; |
222 | 222 | ||
223 | static int __init eukrea_cpuimx51sd_otg_mode(char *options) | 223 | static int __init eukrea_cpuimx51sd_otg_mode(char *options) |
224 | { | 224 | { |
225 | if (!strcmp(options, "host")) | 225 | if (!strcmp(options, "host")) |
226 | otg_mode_host = 1; | 226 | otg_mode_host = true; |
227 | else if (!strcmp(options, "device")) | 227 | else if (!strcmp(options, "device")) |
228 | otg_mode_host = 0; | 228 | otg_mode_host = false; |
229 | else | 229 | else |
230 | pr_info("otg_mode neither \"host\" nor \"device\". " | 230 | pr_info("otg_mode neither \"host\" nor \"device\". " |
231 | "Defaulting to device\n"); | 231 | "Defaulting to device\n"); |
232 | return 0; | 232 | return 1; |
233 | } | 233 | } |
234 | __setup("otg_mode=", eukrea_cpuimx51sd_otg_mode); | 234 | __setup("otg_mode=", eukrea_cpuimx51sd_otg_mode); |
235 | 235 | ||
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index d1e04e676e33..77a9edd6b843 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -109,18 +109,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
109 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | 109 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static int otg_mode_host; | 112 | static bool otg_mode_host __initdata; |
113 | 113 | ||
114 | static int __init eukrea_cpuimx25_otg_mode(char *options) | 114 | static int __init eukrea_cpuimx25_otg_mode(char *options) |
115 | { | 115 | { |
116 | if (!strcmp(options, "host")) | 116 | if (!strcmp(options, "host")) |
117 | otg_mode_host = 1; | 117 | otg_mode_host = true; |
118 | else if (!strcmp(options, "device")) | 118 | else if (!strcmp(options, "device")) |
119 | otg_mode_host = 0; | 119 | otg_mode_host = false; |
120 | else | 120 | else |
121 | pr_info("otg_mode neither \"host\" nor \"device\". " | 121 | pr_info("otg_mode neither \"host\" nor \"device\". " |
122 | "Defaulting to device\n"); | 122 | "Defaulting to device\n"); |
123 | return 0; | 123 | return 1; |
124 | } | 124 | } |
125 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); | 125 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); |
126 | 126 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index c6d385c52257..cc4f83c76ace 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -241,18 +241,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
241 | .phy_mode = FSL_USB2_PHY_ULPI, | 241 | .phy_mode = FSL_USB2_PHY_ULPI, |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static int otg_mode_host; | 244 | static bool otg_mode_host __initdata; |
245 | 245 | ||
246 | static int __init mx27_3ds_otg_mode(char *options) | 246 | static int __init mx27_3ds_otg_mode(char *options) |
247 | { | 247 | { |
248 | if (!strcmp(options, "host")) | 248 | if (!strcmp(options, "host")) |
249 | otg_mode_host = 1; | 249 | otg_mode_host = true; |
250 | else if (!strcmp(options, "device")) | 250 | else if (!strcmp(options, "device")) |
251 | otg_mode_host = 0; | 251 | otg_mode_host = false; |
252 | else | 252 | else |
253 | pr_info("otg_mode neither \"host\" nor \"device\". " | 253 | pr_info("otg_mode neither \"host\" nor \"device\". " |
254 | "Defaulting to device\n"); | 254 | "Defaulting to device\n"); |
255 | return 0; | 255 | return 1; |
256 | } | 256 | } |
257 | __setup("otg_mode=", mx27_3ds_otg_mode); | 257 | __setup("otg_mode=", mx27_3ds_otg_mode); |
258 | 258 | ||
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 4eafdf275ea2..ebcadd2e6be0 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -671,18 +671,18 @@ static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { | |||
671 | .phy_mode = FSL_USB2_PHY_ULPI, | 671 | .phy_mode = FSL_USB2_PHY_ULPI, |
672 | }; | 672 | }; |
673 | 673 | ||
674 | static int otg_mode_host; | 674 | static bool otg_mode_host __initdata; |
675 | 675 | ||
676 | static int __init mx31_3ds_otg_mode(char *options) | 676 | static int __init mx31_3ds_otg_mode(char *options) |
677 | { | 677 | { |
678 | if (!strcmp(options, "host")) | 678 | if (!strcmp(options, "host")) |
679 | otg_mode_host = 1; | 679 | otg_mode_host = true; |
680 | else if (!strcmp(options, "device")) | 680 | else if (!strcmp(options, "device")) |
681 | otg_mode_host = 0; | 681 | otg_mode_host = false; |
682 | else | 682 | else |
683 | pr_info("otg_mode neither \"host\" nor \"device\". " | 683 | pr_info("otg_mode neither \"host\" nor \"device\". " |
684 | "Defaulting to device\n"); | 684 | "Defaulting to device\n"); |
685 | return 0; | 685 | return 1; |
686 | } | 686 | } |
687 | __setup("otg_mode=", mx31_3ds_otg_mode); | 687 | __setup("otg_mode=", mx31_3ds_otg_mode); |
688 | 688 | ||
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 28aa19476de7..af92e5e03163 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -540,18 +540,18 @@ static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { | |||
540 | .portsc = MXC_EHCI_MODE_SERIAL, | 540 | .portsc = MXC_EHCI_MODE_SERIAL, |
541 | }; | 541 | }; |
542 | 542 | ||
543 | static int otg_mode_host; | 543 | static bool otg_mode_host __initdata; |
544 | 544 | ||
545 | static int __init mx35_3ds_otg_mode(char *options) | 545 | static int __init mx35_3ds_otg_mode(char *options) |
546 | { | 546 | { |
547 | if (!strcmp(options, "host")) | 547 | if (!strcmp(options, "host")) |
548 | otg_mode_host = 1; | 548 | otg_mode_host = true; |
549 | else if (!strcmp(options, "device")) | 549 | else if (!strcmp(options, "device")) |
550 | otg_mode_host = 0; | 550 | otg_mode_host = false; |
551 | else | 551 | else |
552 | pr_info("otg_mode neither \"host\" nor \"device\". " | 552 | pr_info("otg_mode neither \"host\" nor \"device\". " |
553 | "Defaulting to device\n"); | 553 | "Defaulting to device\n"); |
554 | return 0; | 554 | return 1; |
555 | } | 555 | } |
556 | __setup("otg_mode=", mx35_3ds_otg_mode); | 556 | __setup("otg_mode=", mx35_3ds_otg_mode); |
557 | 557 | ||
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c index dde397014d4b..3ca6902dfc34 100644 --- a/arch/arm/mach-imx/mach-mx51_babbage.c +++ b/arch/arm/mach-imx/mach-mx51_babbage.c | |||
@@ -307,18 +307,18 @@ static const struct mxc_usbh_platform_data usbh1_config __initconst = { | |||
307 | .portsc = MXC_EHCI_MODE_ULPI, | 307 | .portsc = MXC_EHCI_MODE_ULPI, |
308 | }; | 308 | }; |
309 | 309 | ||
310 | static int otg_mode_host; | 310 | static bool otg_mode_host __initdata; |
311 | 311 | ||
312 | static int __init babbage_otg_mode(char *options) | 312 | static int __init babbage_otg_mode(char *options) |
313 | { | 313 | { |
314 | if (!strcmp(options, "host")) | 314 | if (!strcmp(options, "host")) |
315 | otg_mode_host = 1; | 315 | otg_mode_host = true; |
316 | else if (!strcmp(options, "device")) | 316 | else if (!strcmp(options, "device")) |
317 | otg_mode_host = 0; | 317 | otg_mode_host = false; |
318 | else | 318 | else |
319 | pr_info("otg_mode neither \"host\" nor \"device\". " | 319 | pr_info("otg_mode neither \"host\" nor \"device\". " |
320 | "Defaulting to device\n"); | 320 | "Defaulting to device\n"); |
321 | return 0; | 321 | return 1; |
322 | } | 322 | } |
323 | __setup("otg_mode=", babbage_otg_mode); | 323 | __setup("otg_mode=", babbage_otg_mode); |
324 | 324 | ||
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 541152e450c4..9fe7a1b32d68 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -298,18 +298,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
298 | .phy_mode = FSL_USB2_PHY_ULPI, | 298 | .phy_mode = FSL_USB2_PHY_ULPI, |
299 | }; | 299 | }; |
300 | 300 | ||
301 | static int otg_mode_host; | 301 | static bool otg_mode_host __initdata; |
302 | 302 | ||
303 | static int __init pca100_otg_mode(char *options) | 303 | static int __init pca100_otg_mode(char *options) |
304 | { | 304 | { |
305 | if (!strcmp(options, "host")) | 305 | if (!strcmp(options, "host")) |
306 | otg_mode_host = 1; | 306 | otg_mode_host = true; |
307 | else if (!strcmp(options, "device")) | 307 | else if (!strcmp(options, "device")) |
308 | otg_mode_host = 0; | 308 | otg_mode_host = false; |
309 | else | 309 | else |
310 | pr_info("otg_mode neither \"host\" nor \"device\". " | 310 | pr_info("otg_mode neither \"host\" nor \"device\". " |
311 | "Defaulting to device\n"); | 311 | "Defaulting to device\n"); |
312 | return 0; | 312 | return 1; |
313 | } | 313 | } |
314 | __setup("otg_mode=", pca100_otg_mode); | 314 | __setup("otg_mode=", pca100_otg_mode); |
315 | 315 | ||
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 0a40004154f2..debc286a41d7 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -557,18 +557,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
557 | .phy_mode = FSL_USB2_PHY_ULPI, | 557 | .phy_mode = FSL_USB2_PHY_ULPI, |
558 | }; | 558 | }; |
559 | 559 | ||
560 | static int otg_mode_host; | 560 | static bool otg_mode_host __initdata; |
561 | 561 | ||
562 | static int __init pcm037_otg_mode(char *options) | 562 | static int __init pcm037_otg_mode(char *options) |
563 | { | 563 | { |
564 | if (!strcmp(options, "host")) | 564 | if (!strcmp(options, "host")) |
565 | otg_mode_host = 1; | 565 | otg_mode_host = true; |
566 | else if (!strcmp(options, "device")) | 566 | else if (!strcmp(options, "device")) |
567 | otg_mode_host = 0; | 567 | otg_mode_host = false; |
568 | else | 568 | else |
569 | pr_info("otg_mode neither \"host\" nor \"device\". " | 569 | pr_info("otg_mode neither \"host\" nor \"device\". " |
570 | "Defaulting to device\n"); | 570 | "Defaulting to device\n"); |
571 | return 0; | 571 | return 1; |
572 | } | 572 | } |
573 | __setup("otg_mode=", pcm037_otg_mode); | 573 | __setup("otg_mode=", pcm037_otg_mode); |
574 | 574 | ||
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 73585f55cca0..a8f4a0087b8c 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -330,18 +330,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
330 | .phy_mode = FSL_USB2_PHY_UTMI, | 330 | .phy_mode = FSL_USB2_PHY_UTMI, |
331 | }; | 331 | }; |
332 | 332 | ||
333 | static int otg_mode_host; | 333 | static bool otg_mode_host __initdata; |
334 | 334 | ||
335 | static int __init pcm043_otg_mode(char *options) | 335 | static int __init pcm043_otg_mode(char *options) |
336 | { | 336 | { |
337 | if (!strcmp(options, "host")) | 337 | if (!strcmp(options, "host")) |
338 | otg_mode_host = 1; | 338 | otg_mode_host = true; |
339 | else if (!strcmp(options, "device")) | 339 | else if (!strcmp(options, "device")) |
340 | otg_mode_host = 0; | 340 | otg_mode_host = false; |
341 | else | 341 | else |
342 | pr_info("otg_mode neither \"host\" nor \"device\". " | 342 | pr_info("otg_mode neither \"host\" nor \"device\". " |
343 | "Defaulting to device\n"); | 343 | "Defaulting to device\n"); |
344 | return 0; | 344 | return 1; |
345 | } | 345 | } |
346 | __setup("otg_mode=", pcm043_otg_mode); | 346 | __setup("otg_mode=", pcm043_otg_mode); |
347 | 347 | ||