From 600b388978bf1ea347b2f591ff5430f1e05da4c8 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Mon, 12 Sep 2016 18:00:56 -0700 Subject: tegra: vi: move vi_notify_channel struct to header Move vi_notify_channel structure from source code to header file so it can be shared with other modules that subscribe to vi_notify events. Bug 1785050 Change-Id: I5944cac4d770779853a925d85eac98b1869c4074 Signed-off-by: Frank Chen Reviewed-on: http://git-master/r/1219255 (cherry picked from commit 5d7f3b98898f691b7e7622970dcfb3c95b7059d4) Reviewed-on: http://git-master/r/1222694 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/video/tegra/host/vi/vi_notify.c | 18 ------------------ drivers/video/tegra/host/vi/vi_notify.h | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/video/tegra/host/vi/vi_notify.c b/drivers/video/tegra/host/vi/vi_notify.c index c3a216757..32460ad06 100644 --- a/drivers/video/tegra/host/vi/vi_notify.c +++ b/drivers/video/tegra/host/vi/vi_notify.c @@ -41,24 +41,6 @@ #define NVHOST_VI_RESET_CHANNEL \ _IOW(NVHOST_VI_IOCTL_MAGIC, 15, struct tegra_vi4_syncpts_req) -struct vi_notify_channel { - struct vi_notify_dev *vnd; - atomic_t ign_mask; - - wait_queue_head_t readq; - struct mutex read_lock; - struct rcu_head rcu; - - atomic_t overruns; - atomic_t errors; - atomic_t report; - DECLARE_KFIFO(fifo, struct vi_notify_msg, 128); - struct vi_capture_status status; - - vi_notify_status_callback notify_cb; - vi_notify_error_callback error_cb; -}; - struct vi_notify_dev { struct vi_notify_driver *driver; struct device *device; diff --git a/drivers/video/tegra/host/vi/vi_notify.h b/drivers/video/tegra/host/vi/vi_notify.h index e597b4b86..e572bbec1 100644 --- a/drivers/video/tegra/host/vi/vi_notify.h +++ b/drivers/video/tegra/host/vi/vi_notify.h @@ -70,7 +70,6 @@ void vi_notify_unregister(struct vi_notify_driver *, struct device *); typedef void (*vi_notify_status_callback)(const struct vi_capture_status *); typedef void (*vi_notify_error_callback)(void); -struct vi_notify_channel; struct tegra_vi4_syncpts_req { u32 syncpt_ids[3]; u8 stream; @@ -78,6 +77,24 @@ struct tegra_vi4_syncpts_req { u16 pad; }; +struct vi_notify_channel { + struct vi_notify_dev *vnd; + atomic_t ign_mask; + + wait_queue_head_t readq; + struct mutex read_lock; + struct rcu_head rcu; + + atomic_t overruns; + atomic_t errors; + atomic_t report; + DECLARE_KFIFO(fifo, struct vi_notify_msg, 128); + struct vi_capture_status status; + + vi_notify_status_callback notify_cb; + vi_notify_error_callback error_cb; +}; + /* internal vi_notify_channel API for kernel vi-mode driver */ int vi_notify_channel_set_ign_mask(struct vi_notify_channel *, u32); int vi_notify_channel_set_syncpts(unsigned, -- cgit v1.2.2