Hi, I am reading the code here: device_add()->bus_probe_device()
the source code of bus_probe_device() is:
void bus_probe_device(struct device *dev)
{
struct bus_type *bus = dev->bus;
struct subsys_interface *sif;
......
mutex_lock(&bus->p->mutex);
list_for_each_entry(sif, &bus->p->interfaces, node)
if (sif->add_dev)
sif->add_dev(dev, sif);
mutex_unlock(&bus->p->mutex);
}
location: http://lxr.free-electrons.com/source/drivers/base/bus.c#L543
Problem:
I have already read the relational code of struct subsys_interface, and can't
figure out the purpose of struce subsys_interface and its method add_dev()
Thank you,
--
Perr
_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies