kernels/linux-2.4.0/arch/ia64/sn/io/pci.c
/*
 * snia64_read_config_byte - Read a byte from the config area of the device.
 */
Read a byte from the config area of the device.
Read a byte from the config area of the device .
static int snia64_read_config_byte (struct pci_dev *dev,
                                   int where, unsigned char *val)
{
	unsigned long res = 0;
	unsigned size = 1;
	devfs_handle_t device_vertex;
	if ( (dev == (struct pci_dev *)0) || (val == (unsigned char *)0) ) {
		return PCIBIOS_DEVICE_NOT_FOUND;
	}
	device_vertex = devfn_to_vertex(dev->bus->number, dev->devfn);
	if (!device_vertex) {
		DBG("%s : nonexistent device: bus= 0x%x  slot= 0x%x  func= 0x%x\n", 
		__FUNCTION__, dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
		return(-1);
	}
	res = pciio_config_get(device_vertex, (unsigned) where, size);
	*val = (unsigned char) res;
	return PCIBIOS_SUCCESSFUL;
}
static int snia64_read_config_byte ( struct pci_dev * dev , int where , unsigned char * val ) { unsigned long res = 0 ; unsigned size = 1 ; devfs_handle_t device_vertex ; if ( ( dev == ( struct pci_dev * ) 0 ) || ( val == ( unsigned char * ) 0 ) ) { return PCIBIOS_DEVICE_NOT_FOUND ; } device_vertex = devfn_to_vertex ( dev -> bus -> number , dev -> devfn ) ; if ( ! device_vertex ) { DBG ( " \n " , __FUNCTION__ , dev -> bus -> number , PCI_SLOT ( dev -> devfn ) , PCI_FUNC ( dev -> devfn ) ) ; return ( -1 ) ; } res = pciio_config_get ( device_vertex , ( unsigned ) where , size ) ; * val = ( unsigned char ) res ; return PCIBIOS_SUCCESSFUL ; }
snia64_read_config_byte - Read a byte from the config area of the device.
snia64_read_config_byte - Read a byte from the config area of the device .