Message ID | 20221025155657.1426948-4-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | R-Car CANFD fixes | expand |
On Tue, Oct 25, 2022 at 6:03 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > Replace devm_reset_control_get_exclusive->devm_reset_control_ > get_optional_exclusive so that we can avoid unnecessary > SoC specific check in probe(). > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On 25.10.2022 16:56:57, Biju Das wrote: > Replace devm_reset_control_get_exclusive->devm_reset_control_ > get_optional_exclusive so that we can avoid unnecessary > SoC specific check in probe(). > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Applied this patch to linux-can-next/main only. The other will go into can/main after final review. Thanks, Marc
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 198da643ee6d..a0dd6044830b 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1887,17 +1887,17 @@ static int rcar_canfd_probe(struct platform_device *pdev) gpriv->chip_id = chip_id; gpriv->max_channels = max_channels; - if (gpriv->chip_id == RENESAS_RZG2L) { - gpriv->rstc1 = devm_reset_control_get_exclusive(&pdev->dev, "rstp_n"); - if (IS_ERR(gpriv->rstc1)) - return dev_err_probe(&pdev->dev, PTR_ERR(gpriv->rstc1), - "failed to get rstp_n\n"); - - gpriv->rstc2 = devm_reset_control_get_exclusive(&pdev->dev, "rstc_n"); - if (IS_ERR(gpriv->rstc2)) - return dev_err_probe(&pdev->dev, PTR_ERR(gpriv->rstc2), - "failed to get rstc_n\n"); - } + gpriv->rstc1 = devm_reset_control_get_optional_exclusive(&pdev->dev, + "rstp_n"); + if (IS_ERR(gpriv->rstc1)) + return dev_err_probe(&pdev->dev, PTR_ERR(gpriv->rstc1), + "failed to get rstp_n\n"); + + gpriv->rstc2 = devm_reset_control_get_optional_exclusive(&pdev->dev, + "rstc_n"); + if (IS_ERR(gpriv->rstc2)) + return dev_err_probe(&pdev->dev, PTR_ERR(gpriv->rstc2), + "failed to get rstc_n\n"); /* Peripheral clock */ gpriv->clkp = devm_clk_get(&pdev->dev, "fck");
Replace devm_reset_control_get_exclusive->devm_reset_control_ get_optional_exclusive so that we can avoid unnecessary SoC specific check in probe(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- v1->v2: * No change. --- drivers/net/can/rcar/rcar_canfd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)