| From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
| Date: Tue, 16 Apr 2013 12:34:09 +0200 |
| Subject: [PATCH] net/cpsw: Use fallback for active_slave |
| |
| In case the .dts has not been yet updated we also try to look for the |
| old "cpts_active_slave" property. |
| |
| Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
| --- |
| drivers/net/ethernet/ti/cpsw.c | 8 ++++++-- |
| 1 file changed, 6 insertions(+), 2 deletions(-) |
| |
| Index: linux-stable/drivers/net/ethernet/ti/cpsw.c |
| =================================================================== |
| --- linux-stable.orig/drivers/net/ethernet/ti/cpsw.c |
| +++ linux-stable/drivers/net/ethernet/ti/cpsw.c |
| @@ -1466,8 +1466,12 @@ static int cpsw_probe_dt(struct cpsw_pla |
| |
| if (of_property_read_u32(node, "active_slave", &prop)) { |
| pr_err("Missing active_slave property in the DT.\n"); |
| - ret = -EINVAL; |
| - goto error_ret; |
| + if (of_property_read_u32(node, "cpts_active_slave", &prop)) { |
| + ret = -EINVAL; |
| + goto error_ret; |
| + } else { |
| + pr_err("Using old cpts_active_slave as fallback.\n"); |
| + } |
| } |
| data->active_slave = prop; |
| |