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/mach-cpuimx35.c | |
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/mach-cpuimx35.c')
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx35.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | ||