Lines Matching +full:a +full:- +full:z
6 * Loosely based on drivers/pci/pci-driver.c
21 * zorro_match_device - Tell if a Zorro device structure has a matching
26 * Used by a driver to check whether a Zorro device present in the
33 const struct zorro_dev *z) in zorro_match_device() argument
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()
48 struct zorro_dev *z = to_zorro_dev(dev); in zorro_device_probe() local
50 if (drv->probe) { in zorro_device_probe()
53 id = zorro_match_device(drv->id_table, z); in zorro_device_probe()
55 error = drv->probe(z, id); in zorro_device_probe()
65 struct zorro_dev *z = to_zorro_dev(dev); in zorro_device_remove() local
66 struct zorro_driver *drv = to_zorro_driver(dev->driver); in zorro_device_remove()
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
78 * Returns zero or a negative error value.
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
98 * gives it a chance to clean up by calling its remove() function for
105 driver_unregister(&drv->driver); in zorro_unregister_driver()
111 * zorro_bus_match - Tell if a Zorro device structure has a matching Zorro
116 * Used by the driver core to check whether a Zorro device present in the
117 * system is in a driver's list of supported devices. Returns 1 if
123 struct zorro_dev *z = to_zorro_dev(dev); in zorro_bus_match() local
125 const struct zorro_device_id *ids = zorro_drv->id_table; in zorro_bus_match()
130 return !!zorro_match_device(ids, z); in zorro_bus_match()
135 const struct zorro_dev *z; in zorro_uevent() local
138 return -ENODEV; in zorro_uevent()
140 z = to_zorro_dev(dev); in zorro_uevent()
141 if (!z) 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()