Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753961AbbK3MB4 (ORCPT ); Mon, 30 Nov 2015 07:01:56 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60225 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753840AbbK3MBy (ORCPT ); Mon, 30 Nov 2015 07:01:54 -0500 From: Archit Taneja To: dri-devel@lists.freedesktop.org, a.hajda@samsung.com Cc: linux-kernel@vger.kernel.org, airlied@linux.ie, daniel@ffwll.ch, treding@nvidia.com, l.stach@pengutronix.de, robh@kernel.org, linux-arm-msm@vger.kernel.org, jani.nikula@linux.intel.com, Archit Taneja Subject: [PATCH v3 4/5] drm/dsi: Add routine to unregister dsi device Date: Mon, 30 Nov 2015 17:31:31 +0530 Message-Id: <1448884892-7731-5-git-send-email-architt@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1448884892-7731-1-git-send-email-architt@codeaurora.org> References: <1444123482-25579-1-git-send-email-architt@codeaurora.org> <1448884892-7731-1-git-send-email-architt@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 34 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. 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); +} + /** * enum mipi_dsi_dcs_tear_mode - Tearing Effect Output Line mode * @MIPI_DSI_DCS_TEAR_MODE_VBLANK: the TE output line consists of V-Blanking -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/