struct video_device<`a::A>
{
  struct module *owner;
  char name[32]@zeroterm;
  int type;       /* v4l1 */
  int type2;      /* v4l2 */
  int hardware;
  int minor;

  /* old, obsolete interface -- dropped in 2.5.x, don't use it */
  int (*open)(struct video_device<`a> *, int mode)__attribute__((no_throw));
  void (*close)(struct video_device<`a> *)__attribute__((no_throw));
  long (*read)(struct video_device<`a> *, char *, unsigned long, int noblock)__attribute__((no_throw));
  long (*write)(struct video_device<`a> *, const char *, unsigned long, int noblock)__attribute__((no_throw));
  unsigned int (*poll)(struct video_device<`a> *, struct file *, poll_table *)__attribute__((no_throw));
  int (*ioctl)(struct video_device<`a> *, unsigned int , void *)__attribute__((no_throw));
  int (*mmap)(struct video_device<`a> *, const char *, unsigned long)__attribute__((no_throw));
  int (*initialize)(struct video_device<`a> *)__attribute__((no_throw));       

  /* new interface -- we will use file_operations directly
   * like soundcore does. */
  struct file_operations *fops;
  `a *priv;		/* Used to be 'private' but that upsets C++ */
  
  /* for videodev.c intenal usage -- don't touch */
  int users;
  struct semaphore lock;
  struct devfs_handle *devfs_handle;
};

extern int video_register_device(struct video_device<`a> *, int type, int nr);
extern void video_unregister_device(struct video_device<`a> *);

// struct video_device
// {
//   struct module *owner;
//   char name[32]@zeroterm;
//   int type;       /* v4l1 */
//   int type2;      /* v4l2 */
//   int hardware;
//   int minor;

//   /* old, obsolete interface -- dropped in 2.5.x, don't use it */
//   int (*open)(struct video_device *, int mode);
//   void (*close)(struct video_device *);
//   long (*read)(struct video_device *, char *, unsigned long, int noblock);
//   long (*write)(struct video_device *, const char *, unsigned long, int noblock);
//   unsigned int (*poll)(struct video_device *, struct file *, poll_table *);
//   int (*ioctl)(struct video_device *, unsigned int , void *);
//   int (*mmap)(struct video_device *, const char *, unsigned long);
//   int (*initialize)(struct video_device *);       

//   /* new interface -- we will use file_operations directly
//    * like soundcore does. */
//   struct file_operations *fops;
//   void *priv;		/* Used to be 'private' but that upsets C++ */
  
//   /* for videodev.c intenal usage -- don't touch */
//   int users;
//   struct semaphore lock;
//   struct devfs_handle *devfs_handle;
// };
