Subject: Re: device-type or device_type?
To: Frank Wille <frank@phoenix.owl.de>
From: Matt Sealey <matt@genesi-usa.com>
List: port-ofppc
Date: 10/18/2007 19:09:42
This was already patched wasn't it?

The Open Firmware standard says device_type. The underscore is
ugly and not what you would expect, but this is a holdover from
Sun OpenBoot.

device-type is simply *WRONG*.

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

Frank Wille wrote:
> Hi,
> 
> some time ago I reported a potential bug in pci/ofwpci.c
> (ppcoea-renovation): pci detection failed, because it was
> checked for the attribute "device-type", where my Peg2-OFW
> only knows about "device_type".
> 
> Now, after ppcoea-renovation was merged into the main trunk,
> I checked the source again, and it is still "device-type".
> Does that work for anyone?
> 
> Scanning through the whole current source it seems to me as
> "device_type" is the prefered writing. Only three places differ:
> 
> ofppc/pci/ofwpci.c:     OF_getprop(ca->ca_node, "device-type", name, 
> sizeof(name));
> 
> powerpc/pci/pci_machdep_ofw.c:          if (OF_getprop(node, 
> "device-type", name, sizeof(name)) == -1)
> 
> powerpc/pci/pci_machdep_ofw.c:          OF_getprop(node, "device-type", 
> name, sizeof(name));
> 
> Seems that all of them only affect ofppc. So maybe nobody noticed?
>