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>
This commit is contained in:
Benoît Thébaudeau
2012-06-12 19:46:43 +02:00
committed by Sascha Hauer
父節點 cfaf025112
當前提交 33a264ddcd
共有 11 個文件被更改,包括 44 次插入44 次删除

查看文件

@@ -298,18 +298,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
.phy_mode = FSL_USB2_PHY_ULPI,
};
static int otg_mode_host;
static bool otg_mode_host __initdata;
static int __init pca100_otg_mode(char *options)
{
if (!strcmp(options, "host"))
otg_mode_host = 1;
otg_mode_host = true;
else if (!strcmp(options, "device"))
otg_mode_host = 0;
otg_mode_host = false;
else
pr_info("otg_mode neither \"host\" nor \"device\". "
"Defaulting to device\n");
return 0;
return 1;
}
__setup("otg_mode=", pca100_otg_mode);