Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279810

[PATCH v3 4/5] drm/dsi: Add routine to unregister dsi device

From Archit Taneja <architt@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH v3 4/5] drm/dsi: Add routine to unregister dsi device
Date 2015-11-30 13:10 +0100
Message-ID <qAvrj-3rH-1@gated-at.bofh.it> (permalink)
References <qgwJk-21W-13@gated-at.bofh.it> <qAvrk-3rH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <architt@codeaurora.org>
---
 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/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] drm/dsi: DSI for devices with different control bus Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
  [PATCH v3 4/5] drm/dsi: Add routine to unregister dsi device Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
    Re: [PATCH v3 4/5] drm/dsi: Add routine to unregister dsi device Andrzej Hajda <a.hajda@samsung.com> - 2015-11-30 13:40 +0100
  [PATCH v3 1/5] drm/dsi: Refactor device creation Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
  [PATCH v3 3/5] drm/dsi: Check for used channels Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
  [PATCH v3 2/5] drm/dsi: Try to match non-DT dsi devices Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
  [PATCH v3 5/5] drm/dsi: Get DSI host by DT device node Archit Taneja <architt@codeaurora.org> - 2015-11-30 13:10 +0100
  [PATCH v4 3/6] drm/dsi: Try to match non-DT dsi devices Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
  [PATCH v4 4/6] drm/dsi: Check for used channels Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
  [PATCH v4 5/6] drm/dsi: Add routine to unregister dsi device Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
  [PATCH v4 6/6] drm/dsi: Get DSI host by DT device node Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
  [PATCH v4 2/6] drm/dsi: Refactor device creation Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
  [PATCH v4 0/6] drm/dsi: DSI for devices with different control bus Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100
    [PATCH v4 1/6] drm/dsi: check for CONFIG_OF when defining of_mipi_dsi_device_add Archit Taneja <architt@codeaurora.org> - 2015-12-10 13:50 +0100

csiph-web