]> git.baikalelectronics.ru Git - kernel.git/commit
driver/core: cpu: initialize of_node in cpu's device struture
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Mon, 17 Jun 2013 11:58:45 +0000 (12:58 +0100)
committerSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Wed, 21 Aug 2013 09:29:30 +0000 (10:29 +0100)
commitd2456bff8a29646e2c74e16370c7239e95d9e39f
tree4db96ad4430daf64920b689d516626ab2e09821a
parentea7fc9f230c2e07e658ad13f887bfe9f1def7dbf
driver/core: cpu: initialize of_node in cpu's device struture

CPUs are also registered as devices but the of_node in these cpu
devices are not initialized. Currently different drivers requiring
to access cpu device node are parsing the nodes themselves and
initialising the of_node in cpu device.

The of_node in all the cpu devices needs to be initialized properly
and at one place. The best place to update this is CPU subsystem
driver when registering the cpu devices.

The OF/DT core library now provides of_get_cpu_node to retrieve a cpu
device node for a given logical index by abstracting the architecture
specific details.

This patch uses of_get_cpu_node to assign of_node when registering the
cpu devices.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
drivers/base/cpu.c