00001
00023 #ifndef __ANALOGY_CONTEXT__
00024 #define __ANALOGY_CONTEXT__
00025
00026 #if defined(__KERNEL__) && !defined(DOXYGEN_CPP)
00027
00028 #include <analogy/os_facilities.h>
00029
00030 struct a4l_device;
00031
00032 struct a4l_context {
00033
00034
00035
00036
00037 struct a4l_device *dev;
00038 rtdm_user_info_t *user_info;
00039 struct rtdm_dev_context *rtdm_cxt;
00040 };
00041 typedef struct a4l_context a4l_cxt_t;
00042
00043 #define a4l_get_minor(x) ((x)->rtdm_cxt->device->device_id)
00044
00045 #define a4l_init_cxt(c, u, x) \
00046 { \
00047 (x)->rtdm_cxt = c; \
00048 (x)->user_info = u; \
00049 (x)->dev = NULL; \
00050 }
00051
00052 #endif
00053
00054 #endif