#ifdef CONFIG_ARCH_OMAP1510 
#ifdef CONFIG_ARCH_OMAP15XX 
int omap_request_gpio(int gpio){	struct gpio_bank *bank;	if (check_gpio(gpio) < 0)		return -EINVAL;	bank = get_gpio_bank(gpio);	spin_lock(&bank->lock);	if (unlikely(bank->reserved_map & (1 << get_gpio_index(gpio)))) {		printk(KERN_ERR "omap-gpio: GPIO %d is already reserved!\n", gpio);		dump_stack();		spin_unlock(&bank->lock);		return -1;	}	bank->reserved_map |= (1 << get_gpio_index(gpio));	/* Set trigger to none. You need to enable the trigger after request_irq */	_set_gpio_triggering(bank, get_gpio_index(gpio), IRQT_NOEDGE);#ifdef CONFIG_ARCH_OMAP1510	if (bank->method == METHOD_GPIO_1510) {		void __iomem *reg;		/* Claim the pin for MPU */		reg = bank->base + OMAP1510_GPIO_PIN_CONTROL;		__raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), reg);	}#endif#ifdef CONFIG_ARCH_OMAP16XX	if (bank->method == METHOD_GPIO_1610) {		/* Enable wake-up during idle for dynamic tick */		void __iomem *reg = bank->base + OMAP1610_GPIO_SET_WAKEUPENA;		__raw_writel(1 << get_gpio_index(gpio), reg);	}#endif#ifdef CONFIG_ARCH_OMAP24XX	if (bank->method == METHOD_GPIO_24XX) {		/* Enable wake-up during idle for dynamic tick */		void __iomem *reg = bank->base + OMAP24XX_GPIO_SETWKUENA;		__raw_writel(1 << get_gpio_index(gpio), reg);	}#endif	spin_unlock(&bank->lock);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1a8bfa1eb998af6e650ad26201f7cae9f2a2fdc8/gpio.c/buggy/arch/arm/plat-omap/gpio.c