Remove the driver version information because this information
is not useful in an upstream kernel driver.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 3 ---
1 file changed, 3 deletions(-)
@@ -145,9 +145,6 @@ int mdio_mux_init(struct device *dev,cb=devm_kzalloc(dev,sizeof(*cb),GFP_KERNEL);if(!cb){-dev_err(dev,-"Error: Failed to allocate memory for child %pOF\n",-child_bus_node);ret_val=-ENOMEM;continue;}
@@ -156,9 +153,6 @@ int mdio_mux_init(struct device *dev,cb->mii_bus=mdiobus_alloc();if(!cb->mii_bus){-dev_err(dev,-"Error: Failed to allocate MDIO bus for child %pOF\n",-child_bus_node);ret_val=-ENOMEM;devm_kfree(dev,cb);continue;
mdio_mux_uninit() call put_device (unconditionally) because of
of_mdio_find_bus() in mdio_mux_init.
But of_mdio_find_bus is only called if mux_bus is empty.
If mux_bus is set, mdio_mux_uninit will print a "refcount_t: underflow"
trace.
This patch add a get_device in the other branch of "if (mux_bus)".
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
@@ -116,6 +116,7 @@ int mdio_mux_init(struct device *dev,}else{parent_bus_node=NULL;parent_bus=mux_bus;+get_device(&parent_bus->dev);}pb=devm_kzalloc(dev,sizeof(*pb),GFP_KERNEL);
@@ -184,9 +185,7 @@ int mdio_mux_init(struct device *dev,dev_err(dev,"Error: No acceptable child buses found\n");devm_kfree(dev,pb);err_pb_kz:-/* balance the reference of_mdio_find_bus() took */-if(!mux_bus)-put_device(&parent_bus->dev);+put_device(&parent_bus->dev);err_parent_bus:of_node_put(parent_bus_node);returnret_val;
@@ -204,7 +203,6 @@ void mdio_mux_uninit(void *mux_handle)cb=cb->next;}-/* balance the reference of_mdio_find_bus() in mdio_mux_init() took */put_device(&pb->mii_bus->dev);}EXPORT_SYMBOL_GPL(mdio_mux_uninit);
This patch fix an old information that mdio-mux-mmioreg can only handle
8bit registers.
This is not true anymore.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -120,7 +120,7 @@ int mdio_mux_init(struct device *dev,}pb=devm_kzalloc(dev,sizeof(*pb),GFP_KERNEL);-if(pb==NULL){+if(!pb){ret_val=-ENOMEM;gotoerr_pb_kz;}
@@ -144,7 +144,7 @@ int mdio_mux_init(struct device *dev,}cb=devm_kzalloc(dev,sizeof(*cb),GFP_KERNEL);-if(cb==NULL){+if(!cb){dev_err(dev,"Error: Failed to allocate memory for child %pOF\n",child_bus_node);
From: Andrew Lunn <andrew@lunn.ch> Date: 2017-09-01 13:38:26
On Fri, Sep 01, 2017 at 01:56:02PM +0200, Corentin Labbe wrote:
Remove the driver version information because this information
is not useful in an upstream kernel driver.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
From: Andrew Lunn <andrew@lunn.ch> Date: 2017-09-01 13:38:53
On Fri, Sep 01, 2017 at 01:56:04PM +0200, Corentin Labbe wrote:
mdio_mux_uninit() call put_device (unconditionally) because of
of_mdio_find_bus() in mdio_mux_init.
But of_mdio_find_bus is only called if mux_bus is empty.
If mux_bus is set, mdio_mux_uninit will print a "refcount_t: underflow"
trace.
This patch add a get_device in the other branch of "if (mux_bus)".
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>