#ifndef __COMMON_H__
#define __COMMON_H__
//****************************************************************************
// Copyright (C) 2000-2004 ARW Elektronik Germany
//
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// This product is not authorized for use as critical component in
// life support systems without the express written approval of
// ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
// Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)
//
//****************************************************************************
//****************************************************************************
//
// common.h - common definitions to include in all *.c files
//
// $Log: common.h,v $
// Revision 1.6 2004/08/13 19:23:26 klaus
// conversion to kernel-version 2.6, released version 3.0
//
// Revision 1.5 2002/10/18 21:56:28 klaus
// completed functional features, untested
//
// Revision 1.3 2002/10/10 18:57:46 klaus
// source beautyfied
//
//****************************************************************************
#include <generated/autoconf.h>
#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
#define MODVERSIONS
#endif
#include <linux/version.h>
#ifdef MODVERSIONS
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <config/modversions.h>
#else
#include <linux/modversions.h>
#endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
#define kfree_s(ptr, size) kfree(ptr) /* a workaround cause kfree_s is disapeared in V 2.4 */
#endif
// circumvent deprecated MOD_..._USE_COUNT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#define __MOD_INC_USE_COUNT__
#define __MOD_DEC_USE_COUNT__
#else
#define __MOD_INC_USE_COUNT__ MOD_INC_USE_COUNT
#define __MOD_DEC_USE_COUNT__ MOD_DEC_USE_COUNT
#endif
// switch to disable all printks for not debugging
#ifdef __DEBUG__
#define PRINTK printk
#else
#define PRINTK(stuff...)
#endif
#endif /* __COMMON_H__ */