Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The pint_probe function is the device_probe implementation for this driver. Here is its function definition (again):
static int
pint_probe(device_t dev)
{
/* probe() is always OK. */
device_set_desc(dev, "Interrupt Handler Example");
return (BUS_PROBE_SPECIFIC);
}
As you can see, this function always returns the success code
BUS_PROBE_SPECIFIC, so Example 8-1 attaches to every device it probes. This may seem erroneous, but it is the correct behavior, as devices identified by a device_identify routine, using BUS_ADD_CHILD, are probed only by drivers with the same name. In this case, the identified device and driver name is PINT_NAME.