Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbeAPNDk (ORCPT + 1 other); Tue, 16 Jan 2018 08:03:40 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:54337 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbeAPNDi (ORCPT ); Tue, 16 Jan 2018 08:03:38 -0500 Subject: Re: [PATCH v8 3/5] can: m_can: Move allocation of net device to probe To: Faiz Abbas , wg@grandegger.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, nsekhar@ti.com, fcooper@ti.com, robh@kernel.org, Wenyou.Yang@microchip.com, sergei.shtylyov@cogentembedded.com, linux-omap@vger.kernel.org, b29396@freescale.com References: <1516102634-6771-1-git-send-email-faiz_abbas@ti.com> <1516102634-6771-4-git-send-email-faiz_abbas@ti.com> From: Marc Kleine-Budde Message-ID: Date: Tue, 16 Jan 2018 14:03:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1516102634-6771-4-git-send-email-faiz_abbas@ti.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o1aPLotbbMXjHPp2RnqVJj2cKZ75drpM8" X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --o1aPLotbbMXjHPp2RnqVJj2cKZ75drpM8 Content-Type: multipart/mixed; boundary="zXE1HVfUEdOMgWGlHp6qV7D56LI6xAhSz"; protected-headers="v1" From: Marc Kleine-Budde To: Faiz Abbas , wg@grandegger.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, nsekhar@ti.com, fcooper@ti.com, robh@kernel.org, Wenyou.Yang@microchip.com, sergei.shtylyov@cogentembedded.com, linux-omap@vger.kernel.org, b29396@freescale.com Message-ID: Subject: Re: [PATCH v8 3/5] can: m_can: Move allocation of net device to probe References: <1516102634-6771-1-git-send-email-faiz_abbas@ti.com> <1516102634-6771-4-git-send-email-faiz_abbas@ti.com> In-Reply-To: <1516102634-6771-4-git-send-email-faiz_abbas@ti.com> --zXE1HVfUEdOMgWGlHp6qV7D56LI6xAhSz Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable 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.= >=20 > Therefore, move the allocation of net device to probe and change > alloc_m_can_dev() to setup_m_can_dev(). >=20 > Signed-off-by: Faiz Abbas > --- > drivers/net/can/m_can/m_can.c | 30 +++++++++++++----------------- > 1 file changed, 13 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_ca= n.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; > } > =20 > -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_de= vice *dev, > + void __iomem *addr) Renamed to m_can_dev_setup() for consistent namespace. Marc --=20 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 | --zXE1HVfUEdOMgWGlHp6qV7D56LI6xAhSz-- --o1aPLotbbMXjHPp2RnqVJj2cKZ75drpM8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEE4bay/IylYqM/npjQHv7KIOw4HPYFAlpd+AgACgkQHv7KIOw4 HPaqDAf/bOYg93siMGmH8x6OFZncBB3PXfr0LyBUF45Nz/IbYHE7WCQhEwgsDNi3 Ionl8CtPmnWjEnfCrDdcXHZVMoGocT5ASV3RJPK+k0qOxWdnOrltbGODhd06HMxf HttRQ0DxtBXFbo2gZLkyA6LpFcH5Smr9Ks5MQWuOQawAJguZvmNck9rQexdeVppf 2WYzbc1+mSVGKYWvLgTaG1t7/JFxlyhPwb6fRf9gZmsNkaYiH4qOeMSDufFI3GhC whdW2GDmqVja2Z81blPeId7/T5lITPdRAPStrnOLY9vnsFAnP4SnD11CAOeHzspo MNyesZr5VUis4FQw/2+onntuAG3R5A== =uwMT -----END PGP SIGNATURE----- --o1aPLotbbMXjHPp2RnqVJj2cKZ75drpM8--