History

Merge tag 'devprop-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull device properties framework fixes from Rafael Wysocki: "Fix the secondary firmware node handling while manipulating the primary firmware node for a given device (Andy Shevchenko)" * tag 'devprop-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Don't clear secondary pointer for shared primary firmware node device property: Keep secondary firmware node secondary by type

Linus Torvalds committed 6 years ago

Commit a5a16052 parents ee17690 99aed921 file · +3 −1Browse files

Unified · Split

drivers/base/core.c+3−1
@@ -4264,6 +4264,7 @@ static inline bool fwnode_is_primary(struct fwnode_handle *fwnode) · 4263 unmodified lines
4264 */4264 */
4265void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)4265void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
4266{4266{
4267 struct device *parent = dev->parent;
4267 struct fwnode_handle *fn = dev->fwnode;4268 struct fwnode_handle *fn = dev->fwnode;
4268 4269
4269 if (fwnode) {4270 if (fwnode) {
@@ -4278,7 +4279,8 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode) · 8 unmodified lines
4278 } else {4279 } else {
4279 if (fwnode_is_primary(fn)) {4280 if (fwnode_is_primary(fn)) {
4280 dev->fwnode = fn->secondary;4281 dev->fwnode = fn->secondary;
4281 fn->secondary = NULL;4282 if (!(parent && fn == parent->fwnode))
4283 fn->secondary = ERR_PTR(-ENODEV);
4282 } else {4284 } else {
4283 dev->fwnode = NULL;4285 dev->fwnode = NULL;
4284 }4286 }