struct e1000_adapter *adapter = netdev->priv; 
struct e1000_adapter *adapter = netdev_priv(netdev); 
e1000_get_eeprom(struct net_device *netdev,                      struct ethtool_eeprom *eeprom, uint8_t *bytes){	struct e1000_adapter *adapter = netdev->priv;	struct e1000_hw *hw = &adapter->hw;	uint16_t *eeprom_buff;	int first_word, last_word;	int ret_val = 0;	uint16_t i;	if(eeprom->len == 0)		return -EINVAL;	eeprom->magic = hw->vendor_id | (hw->device_id << 16);	first_word = eeprom->offset >> 1;	last_word = (eeprom->offset + eeprom->len - 1) >> 1;	eeprom_buff = kmalloc(sizeof(uint16_t) *			(last_word - first_word + 1), GFP_KERNEL);	if(!eeprom_buff)		return -ENOMEM;	if(hw->eeprom.type == e1000_eeprom_spi)		ret_val = e1000_read_eeprom(hw, first_word,					    last_word - first_word + 1,					    eeprom_buff);	else {		for (i = 0; i < last_word - first_word + 1; i++)			if((ret_val = e1000_read_eeprom(hw, first_word + i, 1,							&eeprom_buff[i])))				break;	}	/* Device's eeprom is always little-endian, word addressable */	for (i = 0; i < last_word - first_word + 1; i++)		le16_to_cpus(&eeprom_buff[i]);	memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1),			eeprom->len);	kfree(eeprom_buff);	return ret_val;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60490fe030f3969a8706d94c7cf8469be6330678/e1000_ethtool.c/clean/drivers/net/e1000/e1000_ethtool.c