Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
tuner-i2c.h File Reference
#include <linux/i2c.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  tuner_i2c_props
 

Macros

#define tuner_printk(kernlvl, i2cprops, fmt, arg...)
 
#define __tuner_warn(i2cprops, fmt, arg...)
 
#define __tuner_info(i2cprops, fmt, arg...)
 
#define __tuner_err(i2cprops, fmt, arg...)
 
#define __tuner_dbg(i2cprops, fmt, arg...)
 
#define tuner_warn(fmt, arg...)   __tuner_warn(priv->i2c_props, fmt, ##arg)
 
#define tuner_info(fmt, arg...)   __tuner_info(priv->i2c_props, fmt, ##arg)
 
#define tuner_err(fmt, arg...)   __tuner_err(priv->i2c_props, fmt, ##arg)
 
#define tuner_dbg(fmt, arg...)   __tuner_dbg(priv->i2c_props, fmt, ##arg)
 
#define hybrid_tuner_request_state(type, state, list, i2cadap, i2caddr, devname)
 
#define hybrid_tuner_release_state(state)
 
#define hybrid_tuner_report_instance_count(state)
 

Macro Definition Documentation

#define __tuner_dbg (   i2cprops,
  fmt,
  arg... 
)
Value:
do { \
if ((debug)) \
tuner_printk(KERN_DEBUG, i2cprops, fmt, ##arg); \
} while (0)

Definition at line 107 of file tuner-i2c.h.

#define __tuner_err (   i2cprops,
  fmt,
  arg... 
)
Value:
do { \
tuner_printk(KERN_ERR, i2cprops, fmt, ##arg); \
} while (0)

Definition at line 103 of file tuner-i2c.h.

#define __tuner_info (   i2cprops,
  fmt,
  arg... 
)
Value:
do { \
tuner_printk(KERN_INFO, i2cprops, fmt, ##arg); \
} while (0)

Definition at line 99 of file tuner-i2c.h.

#define __tuner_warn (   i2cprops,
  fmt,
  arg... 
)
Value:
do { \
tuner_printk(KERN_WARNING, i2cprops, fmt, ##arg); \
} while (0)

Definition at line 95 of file tuner-i2c.h.

#define hybrid_tuner_release_state (   state)
Value:
({ \
int __ret; \
state->i2c_props.count--; \
__ret = state->i2c_props.count; \
if (!state->i2c_props.count) { \
__tuner_info(state->i2c_props, "destroying instance\n");\
list_del(&state->hybrid_tuner_instance_list); \
kfree(state); \
} \
__ret; \
})

Definition at line 161 of file tuner-i2c.h.

#define hybrid_tuner_report_instance_count (   state)
Value:
({ \
int __ret = 0; \
if (state) \
__ret = state->i2c_props.count; \
__ret; \
})

Definition at line 174 of file tuner-i2c.h.

#define hybrid_tuner_request_state (   type,
  state,
  list,
  i2cadap,
  i2caddr,
  devname 
)
Value:
({ \
int __ret = 0; \
list_for_each_entry(state, &list, hybrid_tuner_instance_list) { \
if (((i2cadap) && (state->i2c_props.adap)) && \
((i2c_adapter_id(state->i2c_props.adap) == \
i2c_adapter_id(i2cadap)) && \
(i2caddr == state->i2c_props.addr))) { \
__tuner_info(state->i2c_props, \
"attaching existing instance\n"); \
state->i2c_props.count++; \
__ret = state->i2c_props.count; \
break; \
} \
} \
if (0 == __ret) { \
state = kzalloc(sizeof(type), GFP_KERNEL); \
if (NULL == state) \
goto __fail; \
state->i2c_props.addr = i2caddr; \
state->i2c_props.adap = i2cadap; \
state->i2c_props.name = devname; \
__tuner_info(state->i2c_props, \
"creating new instance\n"); \
list_add_tail(&state->hybrid_tuner_instance_list, &list);\
state->i2c_props.count++; \
__ret = state->i2c_props.count; \
} \
__fail: \
__ret; \
})

Definition at line 129 of file tuner-i2c.h.

#define tuner_dbg (   fmt,
  arg... 
)    __tuner_dbg(priv->i2c_props, fmt, ##arg)

Definition at line 115 of file tuner-i2c.h.

#define tuner_err (   fmt,
  arg... 
)    __tuner_err(priv->i2c_props, fmt, ##arg)

Definition at line 114 of file tuner-i2c.h.

#define tuner_info (   fmt,
  arg... 
)    __tuner_info(priv->i2c_props, fmt, ##arg)

Definition at line 113 of file tuner-i2c.h.

#define tuner_printk (   kernlvl,
  i2cprops,
  fmt,
  arg... 
)
Value:
do { \
printk(kernlvl "%s %d-%04x: " fmt, i2cprops.name, \
i2cprops.adap ? \
i2c_adapter_id(i2cprops.adap) : -1, \
i2cprops.addr, ##arg); \
} while (0)

Definition at line 85 of file tuner-i2c.h.

#define tuner_warn (   fmt,
  arg... 
)    __tuner_warn(priv->i2c_props, fmt, ##arg)

Definition at line 112 of file tuner-i2c.h.