We need to go to parent's private data to get a pointer to struct rave_sp. Fix that. Fixes: 493e2ee38f ("ARM: zii-common: add support for switch reset on RDU1") Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/arm/boards/zii-common/switch-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boards/zii-common/switch-cmd.c b/arch/arm/boards/zii-common/switch-cmd.c index 30438053a1..2b9c34bfac 100644 --- a/arch/arm/boards/zii-common/switch-cmd.c +++ b/arch/arm/boards/zii-common/switch-cmd.c @@ -42,7 +42,7 @@ static int do_rdu2_switch_reset(void) static int do_rdu1_switch_reset(void) { struct device_d *sp_dev = get_device_by_name("sp"); - struct rave_sp *sp = sp_dev->priv; + struct rave_sp *sp = sp_dev->parent->priv; u8 cmd[] = { [0] = RAVE_SP_CMD_RESET_ETH_SWITCH, [1] = 0 -- 2.21.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox