1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Media controller test application 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2010-2011 Ideas on board SPRL 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify 9*4882a593Smuzhiyun * it under the terms of the GNU Lesser General Public License as published 10*4882a593Smuzhiyun * by the Free Software Foundation; either version 2.1 of the License, or 11*4882a593Smuzhiyun * (at your option) any later version. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 14*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*4882a593Smuzhiyun * GNU Lesser General Public License for more details. 17*4882a593Smuzhiyun * 18*4882a593Smuzhiyun * You should have received a copy of the GNU Lesser General Public License 19*4882a593Smuzhiyun * along with this program. If not, see <http://www.gnu.org/licenses/>. 20*4882a593Smuzhiyun */ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #ifndef __TOOLS_H__ 23*4882a593Smuzhiyun #define __TOOLS_H__ 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) 26*4882a593Smuzhiyun #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun void media_print_streampos(struct media_device *media, const char *p, 29*4882a593Smuzhiyun const char *end); 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun #endif /* __TOOLS_H__ */ 32