summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/bus/pci.c18
-rw-r--r--src/drivers/net/pnic.c2
-rw-r--r--src/include/dev.h2
-rw-r--r--src/include/pci.h2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c
index 3cbe67e5..c58a186b 100644
--- a/src/drivers/bus/pci.c
+++ b/src/drivers/bus/pci.c
@@ -143,24 +143,24 @@ static int pci_fill_device ( struct bus_dev *bus_dev,
*
*/
static int pci_check_driver ( struct bus_dev *bus_dev,
- struct device_driver *device_driver ) {
+ struct device_driver *device_driver ) {
struct pci_device *pci = ( struct pci_device * ) bus_dev;
- struct pci_driver_info *pci_driver_info
- = ( struct pci_driver_info * ) device_driver->bus_driver_info;
+ struct pci_driver *pci_driver
+ = ( struct pci_driver * ) device_driver->bus_driver_info;
unsigned int i;
/* If driver has a class, and class matches, use it */
- if ( pci_driver_info->class &&
- ( pci_driver_info->class == pci->class ) ) {
+ if ( pci_driver->class &&
+ ( pci_driver->class == pci->class ) ) {
DBG ( "driver %s matches class %hx\n",
- device_driver->name, pci_driver_info->class );
+ device_driver->name, pci_driver->class );
pci->name = device_driver->name;
return 1;
}
/* If any of driver's IDs match, use it */
- for ( i = 0 ; i < pci_driver_info->id_count; i++ ) {
- struct pci_id *id = &pci_driver_info->ids[i];
+ for ( i = 0 ; i < pci_driver->id_count; i++ ) {
+ struct pci_id *id = &pci_driver->ids[i];
if ( ( pci->vendor_id == id->vendor_id ) &&
( pci->device_id == id->device_id ) ) {
@@ -193,7 +193,7 @@ static char * pci_describe ( struct bus_dev *bus_dev ) {
* Name a PCI device
*
*/
-static char * pci_name ( struct bus_dev *bus_dev ) {
+static const char * pci_name ( struct bus_dev *bus_dev ) {
struct pci_device *pci = ( struct pci_device * ) bus_dev;
return pci->name;
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index 68b86b61..eee3a708 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -246,7 +246,7 @@ static struct pci_id pnic_nics[] = {
PCI_ROM ( 0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor" ),
};
-static struct pci_driver_info pnic_driver =
+static struct pci_driver pnic_driver =
PCI_DRIVER ( pnic_nics, PCI_NO_CLASS );
DRIVER ( "PNIC", nic_driver, pci_driver, pnic_driver,
diff --git a/src/include/dev.h b/src/include/dev.h
index 4f114496..83b7f827 100644
--- a/src/include/dev.h
+++ b/src/include/dev.h
@@ -154,7 +154,7 @@ struct bus_driver {
int ( *check_driver ) ( struct bus_dev *bus_dev,
struct device_driver *device_driver );
char * ( *describe ) ( struct bus_dev *bus_dev );
- char * ( *name ) ( struct bus_dev *bus_dev );
+ const char * ( *name ) ( struct bus_dev *bus_dev );
};
#define __bus_driver __attribute__ (( used, __section__ ( ".drivers.bus" ) ))
diff --git a/src/include/pci.h b/src/include/pci.h
index 49e36d50..677e09a6 100644
--- a/src/include/pci.h
+++ b/src/include/pci.h
@@ -296,7 +296,7 @@ struct pci_id {
* can handle an entire class of devices.
*
*/
-struct pci_driver_info {
+struct pci_driver {
struct pci_id *ids;
unsigned int id_count;
uint16_t class;