Allow child devices to set the OpenFirmware device node ivar

This commit is contained in:
Peter Grehan 2004-02-04 12:50:47 +00:00
parent 3ce0bf5144
commit 9960916dbb
2 changed files with 10 additions and 4 deletions

View File

@ -269,11 +269,14 @@ nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
return (ENOENT);
switch (which) {
case NEXUS_IVAR_NODE:
case NEXUS_IVAR_NAME:
return (EINVAL);
/* Identified devices will want to set this */
/* Identified devices may want to set these */
case NEXUS_IVAR_NODE:
dinfo->ndi_node = (phandle_t)value;
break;
case NEXUS_IVAR_DEVICE_TYPE:
dinfo->ndi_device_type = (char *)value;
break;

View File

@ -269,11 +269,14 @@ nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
return (ENOENT);
switch (which) {
case NEXUS_IVAR_NODE:
case NEXUS_IVAR_NAME:
return (EINVAL);
/* Identified devices will want to set this */
/* Identified devices may want to set these */
case NEXUS_IVAR_NODE:
dinfo->ndi_node = (phandle_t)value;
break;
case NEXUS_IVAR_DEVICE_TYPE:
dinfo->ndi_device_type = (char *)value;
break;