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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125434
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;