]> git.baikalelectronics.ru Git - kernel.git/commit
device property: add description of fwnode cases
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 5 Jan 2021 09:11:46 +0000 (17:11 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Jan 2021 16:55:55 +0000 (17:55 +0100)
commit4ec6778208a80721f9815a31ffa48bf9e7f122c7
treeafe9a44d1665d343d22ea26da000d4ca3da6a52f
parent5e09e29bcbe24539af0389a0f4c778601ce4ff3d
device property: add description of fwnode cases

There are only four valid fwnode cases which are
- primary --> secondary --> -ENODEV
- primary --> NULL
- secondary --> -ENODEV
- NULL

dev->fwnode should be converted between the 4 cases above no matter
how/when set_primary_fwnode() and set_secondary_fwnode() are called.
Describe it in the code so people will keep it in mind.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
[ rjw: Comment edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/core.c