From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: Re: [PATCH v4 5/6] drm/dsi: Add routine to unregister dsi device Date: Wed, 27 Jan 2016 10:50:14 +0530 Message-ID: <56A8538E.4030502@codeaurora.org> 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> <20160121161257.GE647@ulmo.nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160121161257.GE647@ulmo.nvidia.com> Sender: linux-arm-msm-owner@vger.kernel.org To: Thierry Reding 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 List-Id: dri-devel@lists.freedesktop.org On 01/21/2016 09:42 PM, Thierry Reding wrote: > 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. >> >> Reviewed-by: Andrzej Hajda >> Signed-off-by: Archit Taneja >> --- >> include/drm/drm_mipi_dsi.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> 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, >> >> 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 *dsi) >> +{ >> + 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. I can do this. Thanks, Archit -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation