save_flags(flags); cli(); 
local_irq_save(flags); 
unsigned long inline setget_input(struct gpio_private *priv, unsigned long arg){	/* Set direction 0=unchanged 1=input, 	 * return mask with 1=input 	 */	unsigned long flags;	if (USE_PORTS(priv)) {		local_irq_save(flags); local_irq_disable();		*priv->dir = *priv->dir_shadow &= 		~((unsigned char)arg & priv->changeable_dir);		local_irq_restore(flags);		return ~(*priv->dir_shadow) & 0xFF; /* Only 8 bits */	} else if (priv->minor == GPIO_MINOR_G) {		/* We must fiddle with R_GEN_CONFIG to change dir */		save_flags(flags); cli();		if (((arg & dir_g_in_bits) != arg) && 		    (arg & changeable_dir_g)) {			arg &= changeable_dir_g;			/* Clear bits in genconfig to set to input */			if (arg & (1<<0)) {				genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG,g0dir);				dir_g_in_bits |= (1<<0);				dir_g_out_bits &= ~(1<<0);			}			if ((arg & 0x0000FF00) == 0x0000FF00) {				genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG,g8_15dir);				dir_g_in_bits |= 0x0000FF00;				dir_g_out_bits &= ~0x0000FF00;			}			if ((arg & 0x00FF0000) == 0x00FF0000) {				genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG,g16_23dir);				dir_g_in_bits |= 0x00FF0000;				dir_g_out_bits &= ~0x00FF0000;			}			if (arg & (1<<24)) {				genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG,g24dir);				dir_g_in_bits |= (1<<24);				dir_g_out_bits &= ~(1<<24);			}			D(printk(KERN_INFO "gpio: SETINPUT on port G set "				 "genconfig to 0x%08lX "				 "in_bits: 0x%08lX "				 "out_bits: 0x%08lX\n",			         (unsigned long)genconfig_shadow,			         dir_g_in_bits, dir_g_out_bits));			*R_GEN_CONFIG = genconfig_shadow;			/* Must be a >120 ns delay before writing this again */						}		restore_flags(flags);		return dir_g_in_bits;	}	return 0;} /* setget_input */
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/7e9204265b4ec6680fad9abc7a78b94087983916/gpio.c/buggy/arch/cris/arch-v10/drivers/gpio.c