diff mbox series

[1/2] Revert "device property: Keep secondary firmware node secondary by type"

Message ID 20210105091146.25422-2-yung-chuan.liao@linux.intel.com
State Accepted
Commit 47f4469970d8861bc06d2d4d45ac8200ff07c693
Headers show
Series Revert "device property: Keep secondary firmware node secondary by type" | expand

Commit Message

Liao, Bard Jan. 5, 2021, 9:11 a.m. UTC
While the commit d5dcce0c414f ("device property: Keep secondary firmware
node secondary by type")
describes everything correct in its commit message the change it made does
the opposite and original commit c15e1bdda436 ("device property: Fix the
secondary firmware node handling in set_primary_fwnode()") was fully
correct. Thus, revert the former one here and improve documentation in
the next patch.

Fixes: d5dcce0c414f ("device property: Keep secondary firmware node secondary by type")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heikki Krogerus Jan. 7, 2021, 2:10 p.m. UTC | #1
On Tue, Jan 05, 2021 at 05:11:45PM +0800, Bard Liao wrote:
> While the commit d5dcce0c414f ("device property: Keep secondary firmware

> node secondary by type")

> describes everything correct in its commit message the change it made does

> the opposite and original commit c15e1bdda436 ("device property: Fix the

> secondary firmware node handling in set_primary_fwnode()") was fully

> correct. Thus, revert the former one here and improve documentation in

> the next patch.

> 

> Fixes: d5dcce0c414f ("device property: Keep secondary firmware node secondary by type")

> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>


FWIW:

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>


> ---

>  drivers/base/core.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/base/core.c b/drivers/base/core.c

> index 25e08e5f40bd..51b9545a050b 100644

> --- a/drivers/base/core.c

> +++ b/drivers/base/core.c

> @@ -4433,7 +4433,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)

>  		if (fwnode_is_primary(fn)) {

>  			dev->fwnode = fn->secondary;

>  			if (!(parent && fn == parent->fwnode))

> -				fn->secondary = ERR_PTR(-ENODEV);

> +				fn->secondary = NULL;

>  		} else {

>  			dev->fwnode = NULL;

>  		}

> -- 

> 2.17.1


-- 
heikki
diff mbox series

Patch

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 25e08e5f40bd..51b9545a050b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4433,7 +4433,7 @@  void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
 		if (fwnode_is_primary(fn)) {
 			dev->fwnode = fn->secondary;
 			if (!(parent && fn == parent->fwnode))
-				fn->secondary = ERR_PTR(-ENODEV);
+				fn->secondary = NULL;
 		} else {
 			dev->fwnode = NULL;
 		}