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