diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2022-07-10 13:52:47 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-07-19 20:46:59 +0200 |
commit | 6d5fe10796bb3d336eac4962e71a3cbb6ff728f9 (patch) | |
tree | 77e489e31a3bf42aaf6b1b38cca0ac6b799104e0 /drivers/net/can/sja1000 | |
parent | can: sja1000: Use device_get_match_data to get device data (diff) | |
download | linux-6d5fe10796bb3d336eac4962e71a3cbb6ff728f9.tar.xz linux-6d5fe10796bb3d336eac4962e71a3cbb6ff728f9.zip |
can: sja1000: Change the return type as void for SoC specific init
Change the return type as void for SoC specific init function as it
always return 0.
Link: https://lore.kernel.org/all/20220710115248.190280-6-biju.das.jz@bp.renesas.com
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/sja1000')
-rw-r--r-- | drivers/net/can/sja1000/sja1000_platform.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c index 0b78568f5286..81bc741905fd 100644 --- a/drivers/net/can/sja1000/sja1000_platform.c +++ b/drivers/net/can/sja1000/sja1000_platform.c @@ -31,7 +31,7 @@ MODULE_LICENSE("GPL v2"); struct sja1000_of_data { size_t priv_sz; - int (*init)(struct sja1000_priv *priv, struct device_node *of); + void (*init)(struct sja1000_priv *priv, struct device_node *of); }; struct technologic_priv { @@ -94,15 +94,13 @@ static void sp_technologic_write_reg16(const struct sja1000_priv *priv, spin_unlock_irqrestore(&tp->io_lock, flags); } -static int sp_technologic_init(struct sja1000_priv *priv, struct device_node *of) +static void sp_technologic_init(struct sja1000_priv *priv, struct device_node *of) { struct technologic_priv *tp = priv->priv; priv->read_reg = sp_technologic_read_reg16; priv->write_reg = sp_technologic_write_reg16; spin_lock_init(&tp->io_lock); - - return 0; } static void sp_populate(struct sja1000_priv *priv, @@ -266,11 +264,8 @@ static int sp_probe(struct platform_device *pdev) if (of) { sp_populate_of(priv, of); - if (of_data && of_data->init) { - err = of_data->init(priv, of); - if (err) - goto exit_free; - } + if (of_data && of_data->init) + of_data->init(priv, of); } else { sp_populate(priv, pdata, res_mem->flags); } |