]> git.baikalelectronics.ru Git - kernel.git/commit
device property: check fwnode type in to_of_node()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Aug 2015 16:56:46 +0000 (19:56 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Aug 2015 23:46:39 +0000 (01:46 +0200)
commit9209e89dea0848d77cc15fe9432f71674b90417c
tree5195f134c30f92f343baa053c533d4a2429b99bb
parent4c2690be1a139a38965042c48e646785e5f3df6b
device property: check fwnode type in to_of_node()

Potentially one of platform can support both ACPI and OF. In that case when we
call to_of_node() for non-OF fwnode types we will get non-NULL result, which is
wrong. Check for the type and return a correspondent result.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/of.h