mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
[device] Make driver name a generic device property
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -63,8 +63,8 @@ static int eisa_probe ( struct eisa_device *eisa ) {
|
||||
ISA_PROD_ID ( eisa->prod_id ) )
|
||||
continue;
|
||||
eisa->driver = driver;
|
||||
eisa->driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", eisa->driver_name );
|
||||
eisa->dev.driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", eisa->dev.driver_name );
|
||||
if ( ( rc = driver->probe ( eisa, id ) ) != 0 ) {
|
||||
DBG ( "......probe failed\n" );
|
||||
continue;
|
||||
|
||||
@@ -114,6 +114,7 @@ static int isabus_probe ( struct root_device *rootdev ) {
|
||||
/* Add to device hierarchy */
|
||||
snprintf ( isa->dev.name, sizeof ( isa->dev.name ),
|
||||
"ISA%04x", isa->ioaddr );
|
||||
isa->dev.driver_name = driver->name;
|
||||
isa->dev.desc.bus_type = BUS_TYPE_ISA;
|
||||
isa->dev.desc.vendor = driver->vendor_id;
|
||||
isa->dev.desc.device = driver->prod_id;
|
||||
|
||||
@@ -600,8 +600,8 @@ static int isapnp_probe ( struct isapnp_device *isapnp ) {
|
||||
ISA_PROD_ID ( isapnp->prod_id ) )
|
||||
continue;
|
||||
isapnp->driver = driver;
|
||||
isapnp->driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", isapnp->driver_name );
|
||||
isapnp->dev.driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", isapnp->dev.driver_name );
|
||||
if ( ( rc = driver->probe ( isapnp, id ) ) != 0 ) {
|
||||
DBG ( "......probe failed\n" );
|
||||
continue;
|
||||
|
||||
@@ -44,8 +44,8 @@ static int mca_probe ( struct mca_device *mca ) {
|
||||
if ( id->id != MCA_ID ( mca ) )
|
||||
continue;
|
||||
mca->driver = driver;
|
||||
mca->driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", mca->driver_name );
|
||||
mca->dev.driver_name = id->name;
|
||||
DBG ( "...using driver %s\n", mca->dev.driver_name );
|
||||
if ( ( rc = driver->probe ( mca, id ) ) != 0 ) {
|
||||
DBG ( "......probe failed\n" );
|
||||
continue;
|
||||
|
||||
@@ -75,6 +75,7 @@ static int linux_probe(struct root_device *rootdev)
|
||||
|
||||
if (driver->probe(device, request) == 0) {
|
||||
device->driver = driver;
|
||||
device->dev.driver_name = driver->name;
|
||||
/* Driver handled the device so release ownership */
|
||||
device = NULL;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user