diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2015-08-25 07:08:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 08:11:50 +0300 |
commit | 56f2de81e020c537f7e35550d13840143cb765cd (patch) | |
tree | 7863e4bfe65656253a9f456bc704a1f4729c6a2c /drivers/base | |
parent | 6713e8fb541656d00249dca6627395b461c39ece (diff) | |
download | linux-56f2de81e020c537f7e35550d13840143cb765cd.tar.xz |
of: to support binding numa node to specified device in devicetree
For now, in function device_add, the new device will be forced to
inherit the numa node of its parent. But this will override the device's
numa node which configured in devicetree.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 334ec7ef1960..b7d56c5ea3c6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1066,7 +1066,7 @@ int device_add(struct device *dev) dev->kobj.parent = kobj; /* use parent numa_node */ - if (parent) + if (parent && (dev_to_node(dev) == NUMA_NO_NODE)) set_dev_node(dev, dev_to_node(parent)); /* first, register with generic layer. */ |