mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Merge tag 'devprop-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework fixes from Rafael Wysocki: "Revert a problematic commit that went in during the 5.10 cycle and improve the kerneldoc description of the function affected by it (both changes from Bard Liao)" * tag 'devprop-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: add description of fwnode cases Revert "device property: Keep secondary firmware node secondary by type"
This commit is contained in:
@@ -4414,6 +4414,12 @@ static inline bool fwnode_is_primary(struct fwnode_handle *fwnode)
|
|||||||
*
|
*
|
||||||
* Set the device's firmware node pointer to @fwnode, but if a secondary
|
* Set the device's firmware node pointer to @fwnode, but if a secondary
|
||||||
* firmware node of the device is present, preserve it.
|
* firmware node of the device is present, preserve it.
|
||||||
|
*
|
||||||
|
* Valid fwnode cases are:
|
||||||
|
* - primary --> secondary --> -ENODEV
|
||||||
|
* - primary --> NULL
|
||||||
|
* - secondary --> -ENODEV
|
||||||
|
* - NULL
|
||||||
*/
|
*/
|
||||||
void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
||||||
{
|
{
|
||||||
@@ -4432,8 +4438,9 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
|||||||
} else {
|
} else {
|
||||||
if (fwnode_is_primary(fn)) {
|
if (fwnode_is_primary(fn)) {
|
||||||
dev->fwnode = fn->secondary;
|
dev->fwnode = fn->secondary;
|
||||||
|
/* Set fn->secondary = NULL, so fn remains the primary fwnode */
|
||||||
if (!(parent && fn == parent->fwnode))
|
if (!(parent && fn == parent->fwnode))
|
||||||
fn->secondary = ERR_PTR(-ENODEV);
|
fn->secondary = NULL;
|
||||||
} else {
|
} else {
|
||||||
dev->fwnode = NULL;
|
dev->fwnode = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user