/* bail out if we get interrupted */ if (signal_pending(current)) return -EINTR;  } 
static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t *off){  int read=0;  unsigned long p = file->f_pos;  unsigned char page;  if(p >= eeprom.size)  /* Address i 0 - (size-1) */  {    return -EFAULT;  }    while(eeprom.busy)  {    interruptible_sleep_on(&eeprom.wait_q);    /* bail out if we get interrupted */    if (signal_pending(current))      return -EINTR;      }  eeprom.busy++;  page = (unsigned char) (p >> 8);    if(!eeprom_address(p))  {    printk(KERN_INFO "%s: Read failed to address the eeprom: "           "0x%08X (%i) page: %i\n", eeprom_name, (int)p, (int)p, page);    i2c_stop();        /* don't forget to wake them up */    eeprom.busy--;    wake_up_interruptible(&eeprom.wait_q);      return -EFAULT;  }  if( (p + count) > eeprom.size)  {    /* truncate count */    count = eeprom.size - p;  }  /* stop dummy write op and initiate the read op */  i2c_start();  /* special case for small eeproms */  if(eeprom.size < EEPROM_16KB)  {    i2c_outbyte( eeprom.select_cmd | 1 | (page << 1) );  }  /* go on with the actual read */  read = read_from_eeprom( buf, count);    if(read > 0)  {    file->f_pos += read;  }  eeprom.busy--;  wake_up_interruptible(&eeprom.wait_q);  return read;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/7e9204265b4ec6680fad9abc7a78b94087983916/eeprom.c/buggy/arch/cris/arch-v10/drivers/eeprom.c