1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2010 - 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14 
15 #include "ia_css_rmgr.h"
16 
17 int ia_css_rmgr_init(void)
18 {
19 	int err = 0;
20 
21 	err = ia_css_rmgr_init_vbuf(vbuf_ref);
22 	if (!err)
23 		err = ia_css_rmgr_init_vbuf(vbuf_write);
24 	if (!err)
25 		err = ia_css_rmgr_init_vbuf(hmm_buffer_pool);
26 	if (err)
27 		ia_css_rmgr_uninit();
28 	return err;
29 }
30 
31 /*
32  * @brief Uninitialize resource pool (host)
33  */
34 void ia_css_rmgr_uninit(void)
35 {
36 	ia_css_rmgr_uninit_vbuf(hmm_buffer_pool);
37 	ia_css_rmgr_uninit_vbuf(vbuf_write);
38 	ia_css_rmgr_uninit_vbuf(vbuf_ref);
39 }
40