*参照元 [#gb694e8a] #backlinks *説明 [#a3389f91] -パス: [[linux-4.4.1/drivers/of/device.c]] -FIXME: これは何? --説明 **引数 [#s501b730] -struct platform_device *ofdev -- --[[linux-4.4.1/platform_device]] **返り値 [#me39dfd3] -int -- **参考 [#p46d272f] *実装 [#g505e6ed] int of_device_add(struct platform_device *ofdev) { BUG_ON(ofdev->dev.of_node == NULL); - --[[linux-4.4.1/BUG_ON()]] /* name and id have to be set so that the platform bus doesn't get * confused on matching */ ofdev->name = dev_name(&ofdev->dev); ofdev->id = -1; - --[[linux-4.4.1/dev_name()]] /* * If this device has not binding numa node in devicetree, that is * of_node_to_nid returns NUMA_NO_NODE. device_add will assume that this * device is on the same node as the parent. */ set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); - --[[linux-4.4.1/set_dev_node()]] --[[linux-4.4.1/of_node_to_nid()]] return device_add(&ofdev->dev); - --[[linux-4.4.1/device_add()]] } *コメント [#y9cda7a4]