Lines Matching refs:bus

118 	drv->driver.bus = &mcb_bus_type;  in __mcb_register_driver()
141 mcb_bus_put(mdev->bus); in mcb_release_dev()
152 int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev) in mcb_device_register() argument
158 dev->dev.bus = &mcb_bus_type; in mcb_device_register()
159 dev->dev.parent = bus->dev.parent; in mcb_device_register()
164 bus->bus_nr, device_id, dev->inst, dev->group, dev->var); in mcb_device_register()
169 device_id, bus->bus_nr, ret); in mcb_device_register()
188 struct mcb_bus *bus; in mcb_alloc_bus() local
191 bus = kzalloc(sizeof(struct mcb_bus), GFP_KERNEL); in mcb_alloc_bus()
192 if (!bus) in mcb_alloc_bus()
197 kfree(bus); in mcb_alloc_bus()
201 INIT_LIST_HEAD(&bus->children); in mcb_alloc_bus()
202 bus->bus_nr = bus_nr; in mcb_alloc_bus()
203 bus->carrier = carrier; in mcb_alloc_bus()
204 return bus; in mcb_alloc_bus()
214 static void mcb_devices_unregister(struct mcb_bus *bus) in mcb_devices_unregister() argument
224 void mcb_release_bus(struct mcb_bus *bus) in mcb_release_bus() argument
226 mcb_devices_unregister(bus); in mcb_release_bus()
228 ida_simple_remove(&mcb_ida, bus->bus_nr); in mcb_release_bus()
230 kfree(bus); in mcb_release_bus()
240 struct mcb_bus *mcb_bus_get(struct mcb_bus *bus) in mcb_bus_get() argument
242 if (bus) in mcb_bus_get()
243 get_device(&bus->dev); in mcb_bus_get()
245 return bus; in mcb_bus_get()
255 void mcb_bus_put(struct mcb_bus *bus) in mcb_bus_put() argument
257 if (bus) in mcb_bus_put()
258 put_device(&bus->dev); in mcb_bus_put()
268 struct mcb_device *mcb_alloc_dev(struct mcb_bus *bus) in mcb_alloc_dev() argument
277 dev->bus = bus; in mcb_alloc_dev()
332 void mcb_bus_add_devices(const struct mcb_bus *bus) in mcb_bus_add_devices() argument
396 struct mcb_bus *bus = dev->bus; in mcb_get_irq() local
398 if (bus->get_irq) in mcb_get_irq()
399 return bus->get_irq(dev); in mcb_get_irq()