mcb: Use the actual bus passed to init and release functions
[linux-2.6-microblaze.git] / drivers / mcb / mcb-core.c
index 5c6157b..2a4a5e7 100644 (file)
@@ -311,7 +311,7 @@ static int __mcb_devices_unregister(struct device *dev, void *data)
 
 static void mcb_devices_unregister(struct mcb_bus *bus)
 {
-       bus_for_each_dev(&mcb_bus_type, NULL, NULL, __mcb_devices_unregister);
+       bus_for_each_dev(bus->dev.bus, NULL, NULL, __mcb_devices_unregister);
 }
 /**
  * mcb_release_bus() - Free a @mcb_bus
@@ -406,7 +406,7 @@ static int __mcb_bus_add_devices(struct device *dev, void *data)
  */
 void mcb_bus_add_devices(const struct mcb_bus *bus)
 {
-       bus_for_each_dev(&mcb_bus_type, NULL, NULL, __mcb_bus_add_devices);
+       bus_for_each_dev(bus->dev.bus, NULL, NULL, __mcb_bus_add_devices);
 }
 EXPORT_SYMBOL_NS_GPL(mcb_bus_add_devices, MCB);