uterm: video: add data pointer
authorDavid Herrmann <dh.herrmann@googlemail.com>
Fri, 11 Jan 2013 15:00:32 +0000 (16:00 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Fri, 11 Jan 2013 15:00:32 +0000 (16:00 +0100)
If we want to load backends during runtime, we must allow them to store
their data. Instead of hardcoding it, we now provide a "data" pointer so
they can store arbitrary data.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm_video_internal.h

index eb7018e..6ebf802 100644 (file)
@@ -282,6 +282,7 @@ struct uterm_mode {
        struct uterm_mode *next;
 
        const struct mode_ops *ops;
+       void *data;
        union {
                struct drm_mode drm;
                struct dumb_mode dumb;
@@ -317,6 +318,7 @@ struct uterm_display {
        struct ev_timer *vblank_timer;
 
        const struct display_ops *ops;
+       void *data;
        union {
                struct drm_display drm;
                struct dumb_display dumb;
@@ -360,6 +362,7 @@ struct uterm_video {
 
        const struct uterm_video_module *mod;
        const struct video_ops *ops;
+       void *data;
        union {
                struct drm_video drm;
                struct dumb_video dumb;