嵌入式软件的bus_type 结构中的一个成员 .match 成员,是一个函数。用来在现有的设备驱动中匹配新插入的设备。匹配方式有4种(设备树、ACPI,id_tables, name)。
以platform总线为例,platform_bus_type 实例的match 为 platform_match,
platform_match 的代码为,很简单的描述4种匹配方式。
static int platform_match(struct device *dev, struct device_driver *drv)
{
struct