Add "name" field to struct device to allow human-readable hardware device

names.

Add "dev" pointer in struct net_device to tie network interfaces back to a
hardware device.

Force natural alignment of data types in __table() macros.  This seems to
prevent gcc from taking the unilateral decision to occasionally increase
their alignment (which screws up the table packing).
This commit is contained in:
Michael Brown
2007-01-10 04:22:09 +00:00
parent cc9b32c405
commit dad5274522
51 changed files with 184 additions and 135 deletions

View File

@@ -28,8 +28,10 @@
*
*/
static struct root_device root_devices[0] __table_start ( root_devices );
static struct root_device root_devices_end[0] __table_end ( root_devices );
static struct root_device root_devices[0]
__table_start ( struct root_device, root_devices );
static struct root_device root_devices_end[0]
__table_end ( struct root_device, root_devices );
/** Registered root devices */
static LIST_HEAD ( devices );
@@ -43,10 +45,10 @@ static LIST_HEAD ( devices );
static int rootdev_probe ( struct root_device *rootdev ) {
int rc;
DBG ( "Adding %s root bus\n", rootdev->name );
DBG ( "Adding %s root bus\n", rootdev->dev.name );
if ( ( rc = rootdev->driver->probe ( rootdev ) ) != 0 ) {
DBG ( "Failed to add %s root bus: %s\n",
rootdev->name, strerror ( rc ) );
rootdev->dev.name, strerror ( rc ) );
return rc;
}
@@ -60,7 +62,7 @@ static int rootdev_probe ( struct root_device *rootdev ) {
*/
static void rootdev_remove ( struct root_device *rootdev ) {
rootdev->driver->remove ( rootdev );
DBG ( "Removed %s root bus\n", rootdev->name );
DBG ( "Removed %s root bus\n", rootdev->dev.name );
}
/**