What's the purpose of subsys_interface in linux/device.h?
Dec. 15, 2016
3:16 p.m.
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
3529
Age (days ago)
3529
Last active (days ago)
0 comments
1 participants
participants (1)
-
Perr Zhang