[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1437486658-28365-13-git-send-email-tomeu.vizoso@collabora.com>
Date: Tue, 21 Jul 2015 15:50:54 +0200
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
To: linux-kernel@...r.kernel.org
Cc: Stephen Warren <swarren@...dotorg.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
linux-arm-kernel@...ts.infradead.org,
Arnd Bergmann <arnd@...db.de>, Mark Brown <broonie@...nel.org>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>
Subject: [RFC PATCH 12/16] Add DEVM_TEGRA_OUTPUT()
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
---
drivers/gpu/drm/tegra/drm.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 70930d262caf..8427f6b0832b 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -236,6 +236,21 @@ void tegra_output_connector_destroy(struct drm_connector *connector);
void tegra_output_encoder_destroy(struct drm_encoder *encoder);
+static inline int devm_acquire_tegra_output(struct device *dev,
+ const struct devm_resource *resource)
+{
+ struct tegra_output *output = dev_get_drvdata(dev) + resource->offset;
+
+ output->dev = dev;
+
+ return tegra_output_probe(output);
+}
+
+#define DEVM_TEGRA_OUTPUT(_struct, _member) { \
+ .initfunc = devm_acquire_tegra_output, \
+ .offset = offsetof_t(struct _struct, _member, struct tegra_output), \
+}
+
/* from dpaux.c */
struct tegra_dpaux;
struct drm_dp_link;
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists