|
@@ -143,24 +143,24 @@ static int pci_fill_device ( struct bus_dev *bus_dev,
|
143
|
143
|
*
|
144
|
144
|
*/
|
145
|
145
|
static int pci_check_driver ( struct bus_dev *bus_dev,
|
146
|
|
- struct device_driver *device_driver ) {
|
|
146
|
+ struct device_driver *device_driver ) {
|
147
|
147
|
struct pci_device *pci = ( struct pci_device * ) bus_dev;
|
148
|
|
- struct pci_driver_info *pci_driver_info
|
149
|
|
- = ( struct pci_driver_info * ) device_driver->bus_driver_info;
|
|
148
|
+ struct pci_driver *pci_driver
|
|
149
|
+ = ( struct pci_driver * ) device_driver->bus_driver_info;
|
150
|
150
|
unsigned int i;
|
151
|
151
|
|
152
|
152
|
/* If driver has a class, and class matches, use it */
|
153
|
|
- if ( pci_driver_info->class &&
|
154
|
|
- ( pci_driver_info->class == pci->class ) ) {
|
|
153
|
+ if ( pci_driver->class &&
|
|
154
|
+ ( pci_driver->class == pci->class ) ) {
|
155
|
155
|
DBG ( "driver %s matches class %hx\n",
|
156
|
|
- device_driver->name, pci_driver_info->class );
|
|
156
|
+ device_driver->name, pci_driver->class );
|
157
|
157
|
pci->name = device_driver->name;
|
158
|
158
|
return 1;
|
159
|
159
|
}
|
160
|
160
|
|
161
|
161
|
/* If any of driver's IDs match, use it */
|
162
|
|
- for ( i = 0 ; i < pci_driver_info->id_count; i++ ) {
|
163
|
|
- struct pci_id *id = &pci_driver_info->ids[i];
|
|
162
|
+ for ( i = 0 ; i < pci_driver->id_count; i++ ) {
|
|
163
|
+ struct pci_id *id = &pci_driver->ids[i];
|
164
|
164
|
|
165
|
165
|
if ( ( pci->vendor_id == id->vendor_id ) &&
|
166
|
166
|
( pci->device_id == id->device_id ) ) {
|
|
@@ -193,7 +193,7 @@ static char * pci_describe ( struct bus_dev *bus_dev ) {
|
193
|
193
|
* Name a PCI device
|
194
|
194
|
*
|
195
|
195
|
*/
|
196
|
|
-static char * pci_name ( struct bus_dev *bus_dev ) {
|
|
196
|
+static const char * pci_name ( struct bus_dev *bus_dev ) {
|
197
|
197
|
struct pci_device *pci = ( struct pci_device * ) bus_dev;
|
198
|
198
|
|
199
|
199
|
return pci->name;
|