diff options
| author | Igor Grinberg <grinberg@compulab.co.il> | 2011-05-03 18:22:09 +0300 | 
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-05-12 02:52:06 -0700 | 
| commit | bc593f5d787d0a015539e21868302fb44a47c3e3 (patch) | |
| tree | 75feac78712ae08e38b678c0dae62cb75765ddb0 /arch/arm/mach-omap2/gpmc-smc91x.c | |
| parent | 9e18630b689d658d65bf59508bfec084f61ff5c6 (diff) | |
| download | olio-linux-3.10-bc593f5d787d0a015539e21868302fb44a47c3e3.tar.xz olio-linux-3.10-bc593f5d787d0a015539e21868302fb44a47c3e3.zip  | |
arm: omap2plus: GPIO cleanup
use gpio_request_<one|array>() instead of multiple gpiolib calls,
remove unneeded variables, etc.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-smc91x.c')
| -rw-r--r-- | arch/arm/mach-omap2/gpmc-smc91x.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c index 877c6f5807b..ba10c24f3d8 100644 --- a/arch/arm/mach-omap2/gpmc-smc91x.c +++ b/arch/arm/mach-omap2/gpmc-smc91x.c @@ -147,25 +147,24 @@ void __init gpmc_smc91x_init(struct omap_smc91x_platform_data *board_data)  			goto free1;  	} -	if (gpio_request(gpmc_cfg->gpio_irq, "SMC91X irq") < 0) +	if (gpio_request_one(gpmc_cfg->gpio_irq, GPIOF_IN, "SMC91X irq") < 0)  		goto free1; -	gpio_direction_input(gpmc_cfg->gpio_irq);  	gpmc_smc91x_resources[1].start = gpio_to_irq(gpmc_cfg->gpio_irq);  	if (gpmc_cfg->gpio_pwrdwn) { -		ret = gpio_request(gpmc_cfg->gpio_pwrdwn, "SMC91X powerdown"); +		ret = gpio_request_one(gpmc_cfg->gpio_pwrdwn, +				       GPIOF_OUT_INIT_LOW, "SMC91X powerdown");  		if (ret)  			goto free2; -		gpio_direction_output(gpmc_cfg->gpio_pwrdwn, 0);  	}  	if (gpmc_cfg->gpio_reset) { -		ret = gpio_request(gpmc_cfg->gpio_reset, "SMC91X reset"); +		ret = gpio_request_one(gpmc_cfg->gpio_reset, +				       GPIOF_OUT_INIT_LOW, "SMC91X reset");  		if (ret)  			goto free3; -		gpio_direction_output(gpmc_cfg->gpio_reset, 0);  		gpio_set_value(gpmc_cfg->gpio_reset, 1);  		msleep(100);  		gpio_set_value(gpmc_cfg->gpio_reset, 0);  |