Lines Matching +full:drv +full:- +full:id

6  *  Loosely based on drivers/pci/pci-driver.c
21 * zorro_match_device - Tell if a Zorro device structure has a matching
22 * Zorro device id structure
23 * @ids: array of Zorro device id structures to search in
35 while (ids->id) { in zorro_match_device()
36 if (ids->id == ZORRO_WILDCARD || ids->id == z->id) in zorro_match_device()
47 struct zorro_driver *drv = to_zorro_driver(dev->driver); in zorro_device_probe() local
50 if (drv->probe) { in zorro_device_probe()
51 const struct zorro_device_id *id; in zorro_device_probe() local
53 id = zorro_match_device(drv->id_table, z); in zorro_device_probe()
54 if (id) in zorro_device_probe()
55 error = drv->probe(z, id); in zorro_device_probe()
66 struct zorro_driver *drv = to_zorro_driver(dev->driver); in zorro_device_remove() local
68 if (drv->remove) in zorro_device_remove()
69 drv->remove(z); in zorro_device_remove()
74 * zorro_register_driver - register a new Zorro driver
75 * @drv: the driver structure to register
81 int zorro_register_driver(struct zorro_driver *drv) in zorro_register_driver() argument
84 drv->driver.name = drv->name; in zorro_register_driver()
85 drv->driver.bus = &zorro_bus_type; in zorro_register_driver()
88 return driver_register(&drv->driver); in zorro_register_driver()
94 * zorro_unregister_driver - unregister a zorro driver
95 * @drv: the driver structure to unregister
103 void zorro_unregister_driver(struct zorro_driver *drv) in zorro_unregister_driver() argument
105 driver_unregister(&drv->driver); in zorro_unregister_driver()
111 * zorro_bus_match - Tell if a Zorro device structure has a matching Zorro
112 * device id structure
113 * @ids: array of Zorro device id structures to search in
121 static int zorro_bus_match(struct device *dev, const struct device_driver *drv) in zorro_bus_match() argument
124 const struct zorro_driver *zorro_drv = to_zorro_driver(drv); in zorro_bus_match()
125 const struct zorro_device_id *ids = zorro_drv->id_table; in zorro_bus_match()
138 return -ENODEV; in zorro_uevent()
142 return -ENODEV; in zorro_uevent()
144 if (add_uevent_var(env, "ZORRO_ID=%08X", z->id) || in zorro_uevent()
146 add_uevent_var(env, "ZORRO_SLOT_ADDR=%04X", z->slotaddr) || in zorro_uevent()
147 add_uevent_var(env, "MODALIAS=" ZORRO_DEVICE_MODALIAS_FMT, z->id)) in zorro_uevent()
148 return -ENOMEM; in zorro_uevent()