Which is the cleaner way to get a pointer to a struct device in linux?
问题 i'd need to obtain a pointer to a particular device registered in linux. Briefly, this device represents a mii_bus object. The problem is that this device seems doesn't belong to a bus (its dev->bus is NULL ) so i can't use for example the function bus_for_each_dev . The device is however registered by the Open Firmware layer and i can see the relative of_device (which is the parent of the device i'm interested in) in /sys/bus/of_platform . My device is also registered in a class so i can