diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2015-08-25 12:08:22 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 22:11:50 -0700 |
commit | 56f2de81e020c537f7e35550d13840143cb765cd (patch) | |
tree | 7863e4bfe65656253a9f456bc704a1f4729c6a2c /drivers/base/core.c | |
parent | 6713e8fb541656d00249dca6627395b461c39ece (diff) | |
download | op-kernel-dev-56f2de81e020c537f7e35550d13840143cb765cd.zip op-kernel-dev-56f2de81e020c537f7e35550d13840143cb765cd.tar.gz |
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/core.c')
-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 334ec7e..b7d56c5 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. */ |