diff options
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/driver_mips.c | 6 | ||||
-rw-r--r-- | drivers/bcma/main.c | 11 |
2 files changed, 6 insertions, 11 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 4f01e6b17bb9..9be0806eb033 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -46,12 +46,6 @@ static inline bool bcma_core_mips_bcm5357b0_quirk(struct bcma_device *dev) dev->id.id == BCMA_CORE_USB20_HOST; } -static inline u32 mips_read32(struct bcma_drv_mips *mcore, - u16 offset) -{ - return bcma_read32(mcore->core, offset); -} - static u32 bcma_core_mips_irqflag(struct bcma_device *dev) { u32 flag; diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 7b39f010bbb3..7061d3ee836a 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -14,6 +14,7 @@ #include <linux/slab.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/of_device.h> #include <linux/of_platform.h> MODULE_DESCRIPTION("Broadcom's specific AMBA driver"); @@ -140,17 +141,17 @@ static struct device_node *bcma_of_find_child_device(struct device *parent, struct bcma_device *core) { struct device_node *node; - u64 size; - const __be32 *reg; + int ret; if (!parent->of_node) return NULL; for_each_child_of_node(parent->of_node, node) { - reg = of_get_address(node, 0, &size, NULL); - if (!reg) + struct resource res; + ret = of_address_to_resource(node, 0, &res); + if (ret) continue; - if (of_translate_address(node, reg) == core->addr) + if (res.start == core->addr) return node; } return NULL; |