Signed-off-by: Tomeu Vizoso <[email protected]>
---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/