adf_fops.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2013 Google, Inc.
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef __VIDEO_ADF_ADF_FOPS_H
  15. #define __VIDEO_ADF_ADF_FOPS_H
  16. #include <linux/bitmap.h>
  17. #include <linux/fs.h>
  18. extern const struct file_operations adf_fops;
  19. struct adf_file {
  20. struct list_head head;
  21. struct adf_obj *obj;
  22. DECLARE_BITMAP(event_subscriptions, ADF_EVENT_TYPE_MAX);
  23. u8 event_buf[4096];
  24. int event_head;
  25. int event_tail;
  26. wait_queue_head_t event_wait;
  27. };
  28. void adf_file_queue_event(struct adf_file *file, struct adf_event *event);
  29. long adf_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
  30. #endif /* __VIDEO_ADF_ADF_FOPS_H */