From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v4 5/6] drm/dsi: Add routine to unregister dsi device Date: Thu, 21 Jan 2016 17:12:58 +0100 Message-ID: <20160121161257.GE647@ulmo.nvidia.com> References: <1448884892-7731-1-git-send-email-architt@codeaurora.org> <1449751300-2841-1-git-send-email-architt@codeaurora.org> <1449751300-2841-6-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFgkTsE6LiHkLPZw" Return-path: Received: from hqemgate16.nvidia.com ([216.228.121.65]:8979 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965479AbcAUQNH (ORCPT ); Thu, 21 Jan 2016 11:13:07 -0500 In-Reply-To: <1449751300-2841-6-git-send-email-architt@codeaurora.org> Content-Disposition: inline Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja Cc: dri-devel@lists.freedesktop.org, a.hajda@samsung.com, jani.nikula@linux.intel.com, linux-kernel@vger.kernel.org, airlied@linux.ie, daniel@ffwll.ch, l.stach@pengutronix.de, robh@kernel.org, linux-arm-msm@vger.kernel.org --qFgkTsE6LiHkLPZw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 10, 2015 at 06:11:39PM +0530, Archit Taneja wrote: > A driver calling mipi_dsi_device_new might want to unregister the device > once it's done. It might also require it in an error handling path in > case something didn't go right. >=20 > Reviewed-by: Andrzej Hajda > Signed-off-by: Archit Taneja > --- > include/drm/drm_mipi_dsi.h | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > index cb084af..410d8b5 100644 > --- a/include/drm/drm_mipi_dsi.h > +++ b/include/drm/drm_mipi_dsi.h > @@ -195,6 +195,11 @@ ssize_t mipi_dsi_generic_read(struct mipi_dsi_device= *dsi, const void *params, > =20 > struct mipi_dsi_device *mipi_dsi_device_new(struct mipi_dsi_host *host, > struct mipi_dsi_device_info *info); > +static inline void mipi_dsi_device_unregister(struct mipi_dsi_device *ds= i) > +{ > + device_unregister(&dsi->dev); > +} This is the same, essentially, as mipi_dsi_remove_device_fn(). I think this should move into drm_mipi_dsi.c and mipi_dsi_remove_device_fn() should call this new function so that both OF and !OF share the same code for this. Thierry --qFgkTsE6LiHkLPZw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWoQOJAAoJEN0jrNd/PrOhOpgP/izj5Qo9O8SXnFW1EjW05eih 6xiXTgcP47pOdJ9beDib3TRPq18fwVmpgZ2b4qjZnUXpxCYvP/t7Cme2STLqL0Va DHT0qzF1dJL1GL4jbthlvYPwcfiq26qrma+r/x0W89HhzNX672pDsmz2uzuF1UFT eMObfUxWxpghs6+h1IquoHG89Fua332wtxzpWo3/dq/D0sYS5SUT4L0FANJ/e1Xd 5LoWjMxmzeXUWk4PVyqWd5O0JiC/8Jieu7dLmijhi/4RvQTEet6TKb/z9uwYKKEw 3W1LNkmvYjpyiRlPeD4UoS75IRrc8knaZB+fZqEG0xY/Pvh/KkRV1fYdI/JK5tI2 vnaKYDMT2skhIgwJ/+swGnVjKKj+6Xkr13lyPUsk7hEfD/XbPBYVFm52sjgbhTaN 6JPssfaLa2TodfmnWUWl/z5SQei0UYyBgSlpCuTLxAzFLUjFUf3QM4MTmerkoup2 ZPuYUZMsULLqqqmTWZrZ9YToqFU6CNPlyrlqGIVvArnG2RHARduEL3cxXE1edGlf BSe5h9wyFyE9B4hmScc1xRfMqHP2nA5FQRXjVrUGXnlAfd/XM/ovaC15OQsL5OVV hHDxwoyWnXR0iW9x40UjhoC9G57QAj06sZNPuKwHae82vPa+uXFxG3QOogPFVIBV Qd2AO+fzdzgifubGklFO =E10i -----END PGP SIGNATURE----- --qFgkTsE6LiHkLPZw-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965587AbcAUQNJ (ORCPT ); Thu, 21 Jan 2016 11:13:09 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:8979 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965479AbcAUQNH (ORCPT ); Thu, 21 Jan 2016 11:13:07 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 21 Jan 2016 08:14:24 -0800 Date: Thu, 21 Jan 2016 17:12:58 +0100 From: Thierry Reding To: Archit Taneja CC: , , , , , , , , Subject: Re: [PATCH v4 5/6] drm/dsi: Add routine to unregister dsi device Message-ID: <20160121161257.GE647@ulmo.nvidia.com> References: <1448884892-7731-1-git-send-email-architt@codeaurora.org> <1449751300-2841-1-git-send-email-architt@codeaurora.org> <1449751300-2841-6-git-send-email-architt@codeaurora.org> MIME-Version: 1.0 In-Reply-To: <1449751300-2841-6-git-send-email-architt@codeaurora.org> X-NVConfidentiality: public User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.2.68.189] X-ClientProxiedBy: UKMAIL101.nvidia.com (10.26.138.13) To UKMAIL102.nvidia.com (10.26.138.15) Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFgkTsE6LiHkLPZw" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qFgkTsE6LiHkLPZw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 10, 2015 at 06:11:39PM +0530, Archit Taneja wrote: > A driver calling mipi_dsi_device_new might want to unregister the device > once it's done. It might also require it in an error handling path in > case something didn't go right. >=20 > Reviewed-by: Andrzej Hajda > Signed-off-by: Archit Taneja > --- > include/drm/drm_mipi_dsi.h | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > index cb084af..410d8b5 100644 > --- a/include/drm/drm_mipi_dsi.h > +++ b/include/drm/drm_mipi_dsi.h > @@ -195,6 +195,11 @@ ssize_t mipi_dsi_generic_read(struct mipi_dsi_device= *dsi, const void *params, > =20 > struct mipi_dsi_device *mipi_dsi_device_new(struct mipi_dsi_host *host, > struct mipi_dsi_device_info *info); > +static inline void mipi_dsi_device_unregister(struct mipi_dsi_device *ds= i) > +{ > + device_unregister(&dsi->dev); > +} This is the same, essentially, as mipi_dsi_remove_device_fn(). I think this should move into drm_mipi_dsi.c and mipi_dsi_remove_device_fn() should call this new function so that both OF and !OF share the same code for this. Thierry --qFgkTsE6LiHkLPZw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWoQOJAAoJEN0jrNd/PrOhOpgP/izj5Qo9O8SXnFW1EjW05eih 6xiXTgcP47pOdJ9beDib3TRPq18fwVmpgZ2b4qjZnUXpxCYvP/t7Cme2STLqL0Va DHT0qzF1dJL1GL4jbthlvYPwcfiq26qrma+r/x0W89HhzNX672pDsmz2uzuF1UFT eMObfUxWxpghs6+h1IquoHG89Fua332wtxzpWo3/dq/D0sYS5SUT4L0FANJ/e1Xd 5LoWjMxmzeXUWk4PVyqWd5O0JiC/8Jieu7dLmijhi/4RvQTEet6TKb/z9uwYKKEw 3W1LNkmvYjpyiRlPeD4UoS75IRrc8knaZB+fZqEG0xY/Pvh/KkRV1fYdI/JK5tI2 vnaKYDMT2skhIgwJ/+swGnVjKKj+6Xkr13lyPUsk7hEfD/XbPBYVFm52sjgbhTaN 6JPssfaLa2TodfmnWUWl/z5SQei0UYyBgSlpCuTLxAzFLUjFUf3QM4MTmerkoup2 ZPuYUZMsULLqqqmTWZrZ9YToqFU6CNPlyrlqGIVvArnG2RHARduEL3cxXE1edGlf BSe5h9wyFyE9B4hmScc1xRfMqHP2nA5FQRXjVrUGXnlAfd/XM/ovaC15OQsL5OVV hHDxwoyWnXR0iW9x40UjhoC9G57QAj06sZNPuKwHae82vPa+uXFxG3QOogPFVIBV Qd2AO+fzdzgifubGklFO =E10i -----END PGP SIGNATURE----- --qFgkTsE6LiHkLPZw--