diff options
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/address.c | 4 | ||||
-rw-r--r-- | drivers/of/base.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index 216b00d99bd8..1dba1a9c1fcf 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -712,7 +712,7 @@ int __weak pci_register_io_range(phys_addr_t addr, resource_size_t size) } /* add the range to the list */ - range = kzalloc(sizeof(*range), GFP_KERNEL); + range = kzalloc(sizeof(*range), GFP_ATOMIC); if (!range) { err = -ENOMEM; goto end_register; @@ -765,7 +765,7 @@ unsigned long __weak pci_address_to_pio(phys_addr_t address) spin_lock(&io_range_lock); list_for_each_entry(res, &io_range_list, list) { if (address >= res->start && address < res->start + res->size) { - addr = res->start - address + offset; + addr = address - res->start + offset; break; } offset += res->size; diff --git a/drivers/of/base.c b/drivers/of/base.c index 4c2ccde42427..469d2b7f47eb 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -88,7 +88,7 @@ EXPORT_SYMBOL(of_n_size_cells); #ifdef CONFIG_NUMA int __weak of_node_to_nid(struct device_node *np) { - return numa_node_id(); + return NUMA_NO_NODE; } #endif |