]> Pileus Git - ~andy/linux/blobdiff - drivers/bcma/main.c
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
[~andy/linux] / drivers / bcma / main.c
index e15430a82e90e766163c7f5f40e26559b3fabbe1..34ea4c588d36bd798ee83bc9db6273eba6baf034 100644 (file)
@@ -78,18 +78,6 @@ static u16 bcma_cc_core_id(struct bcma_bus *bus)
        return BCMA_CORE_CHIPCOMMON;
 }
 
-struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
-{
-       struct bcma_device *core;
-
-       list_for_each_entry(core, &bus->cores, list) {
-               if (core->id.id == coreid)
-                       return core;
-       }
-       return NULL;
-}
-EXPORT_SYMBOL_GPL(bcma_find_core);
-
 struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
                                        u8 unit)
 {
@@ -101,6 +89,7 @@ struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
        }
        return NULL;
 }
+EXPORT_SYMBOL_GPL(bcma_find_core_unit);
 
 bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
                     int timeout)
@@ -176,6 +165,7 @@ static int bcma_register_cores(struct bcma_bus *bus)
                        bcma_err(bus,
                                 "Could not register dev for core 0x%03X\n",
                                 core->id.id);
+                       put_device(&core->dev);
                        continue;
                }
                core->dev_registered = true;