lkml.org 
[lkml]   [2018]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 3/5] can: m_can: Move allocation of net device to probe
From
Date
On 01/16/2018 12:37 PM, Faiz Abbas wrote:
> With the version no longer required to allocate the net device, it can
> be moved to probe and the alloc_m_can_dev() function can be simplified.
>
> Therefore, move the allocation of net device to probe and change
> alloc_m_can_dev() to setup_m_can_dev().
>
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> ---
> drivers/net/can/m_can/m_can.c | 30 +++++++++++++-----------------
> 1 file changed, 13 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 893edbb..ebb74de 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1207,25 +1207,20 @@ static bool m_can_niso_supported(const struct m_can_priv *priv)
> return !niso_timeout;
> }
>
> -static struct net_device *alloc_m_can_dev(struct platform_device *pdev,
> - void __iomem *addr, u32 tx_fifo_size)
> +static int setup_m_can_dev(struct platform_device *pdev, struct net_device *dev,
> + void __iomem *addr)

Renamed to m_can_dev_setup() for consistent namespace.

Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-01-16 14:03    [W:2.122 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site