Archived
14
0
Fork 0

staging: comedi: me4000: remove CALL_PDEBUG macro

The CALL_PDEBUG macro is used to do function tracing in the driver.
There are better ways to do this. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2012-06-13 19:12:18 -07:00 committed by Greg Kroah-Hartman
parent 23bcbb6495
commit 1d489bab66
2 changed files with 0 additions and 69 deletions

View file

@ -163,8 +163,6 @@ static int me4000_probe(struct comedi_device *dev, struct comedi_devconfig *it)
int result, i; int result, i;
struct me4000_board *board; struct me4000_board *board;
CALL_PDEBUG("In me4000_probe()\n");
/* Allocate private memory */ /* Allocate private memory */
if (alloc_private(dev, sizeof(struct me4000_info)) < 0) if (alloc_private(dev, sizeof(struct me4000_info)) < 0)
return -ENOMEM; return -ENOMEM;
@ -308,9 +306,6 @@ found:
static int get_registers(struct comedi_device *dev, struct pci_dev *pci_dev_p) static int get_registers(struct comedi_device *dev, struct pci_dev *pci_dev_p)
{ {
CALL_PDEBUG("In get_registers()\n");
/*--------------------------- plx regbase -------------------------------*/ /*--------------------------- plx regbase -------------------------------*/
info->plx_regbase = pci_resource_start(pci_dev_p, 1); info->plx_regbase = pci_resource_start(pci_dev_p, 1);
@ -362,8 +357,6 @@ static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p)
{ {
int result; int result;
CALL_PDEBUG("In init_board_info()\n");
/* Init spin locks */ /* Init spin locks */
/* spin_lock_init(&info->preload_lock); */ /* spin_lock_init(&info->preload_lock); */
/* spin_lock_init(&info->ai_ctrl_lock); */ /* spin_lock_init(&info->ai_ctrl_lock); */
@ -394,8 +387,6 @@ static int init_ao_context(struct comedi_device *dev)
{ {
int i; int i;
CALL_PDEBUG("In init_ao_context()\n");
for (i = 0; i < thisboard->ao.count; i++) { for (i = 0; i < thisboard->ao.count; i++) {
/* spin_lock_init(&info->ao_context[i].use_lock); */ /* spin_lock_init(&info->ao_context[i].use_lock); */
info->ao_context[i].irq = info->irq; info->ao_context[i].irq = info->irq;
@ -475,9 +466,6 @@ static int init_ao_context(struct comedi_device *dev)
static int init_ai_context(struct comedi_device *dev) static int init_ai_context(struct comedi_device *dev)
{ {
CALL_PDEBUG("In init_ai_context()\n");
info->ai_context.irq = info->irq; info->ai_context.irq = info->irq;
info->ai_context.ctrl_reg = info->me4000_regbase + ME4000_AI_CTRL_REG; info->ai_context.ctrl_reg = info->me4000_regbase + ME4000_AI_CTRL_REG;
@ -509,9 +497,6 @@ static int init_ai_context(struct comedi_device *dev)
static int init_dio_context(struct comedi_device *dev) static int init_dio_context(struct comedi_device *dev)
{ {
CALL_PDEBUG("In init_dio_context()\n");
info->dio_context.dir_reg = info->me4000_regbase + ME4000_DIO_DIR_REG; info->dio_context.dir_reg = info->me4000_regbase + ME4000_DIO_DIR_REG;
info->dio_context.ctrl_reg = info->me4000_regbase + ME4000_DIO_CTRL_REG; info->dio_context.ctrl_reg = info->me4000_regbase + ME4000_DIO_CTRL_REG;
info->dio_context.port_0_reg = info->dio_context.port_0_reg =
@ -528,9 +513,6 @@ static int init_dio_context(struct comedi_device *dev)
static int init_cnt_context(struct comedi_device *dev) static int init_cnt_context(struct comedi_device *dev)
{ {
CALL_PDEBUG("In init_cnt_context()\n");
info->cnt_context.ctrl_reg = info->timer_regbase + ME4000_CNT_CTRL_REG; info->cnt_context.ctrl_reg = info->timer_regbase + ME4000_CNT_CTRL_REG;
info->cnt_context.counter_0_reg = info->cnt_context.counter_0_reg =
info->timer_regbase + ME4000_CNT_COUNTER_0_REG; info->timer_regbase + ME4000_CNT_COUNTER_0_REG;
@ -554,8 +536,6 @@ static int xilinx_download(struct comedi_device *dev)
int idx = 0; int idx = 0;
int size = 0; int size = 0;
CALL_PDEBUG("In xilinx_download()\n");
init_waitqueue_head(&queue); init_waitqueue_head(&queue);
/* /*
@ -634,8 +614,6 @@ static int reset_board(struct comedi_device *dev)
{ {
unsigned long icr; unsigned long icr;
CALL_PDEBUG("In reset_board()\n");
/* Make a hardware reset */ /* Make a hardware reset */
icr = me4000_inl(dev, info->plx_regbase + PLX_ICR); icr = me4000_inl(dev, info->plx_regbase + PLX_ICR);
icr |= 0x40000000; icr |= 0x40000000;
@ -708,8 +686,6 @@ static int me4000_ai_insn_read(struct comedi_device *dev,
unsigned long tmp; unsigned long tmp;
long lval; long lval;
CALL_PDEBUG("In me4000_ai_insn_read()\n");
if (insn->n == 0) { if (insn->n == 0) {
return 0; return 0;
} else if (insn->n > 1) { } else if (insn->n > 1) {
@ -827,8 +803,6 @@ static int me4000_ai_cancel(struct comedi_device *dev,
{ {
unsigned long tmp; unsigned long tmp;
CALL_PDEBUG("In me4000_ai_cancel()\n");
/* Stop any running conversion */ /* Stop any running conversion */
tmp = me4000_inl(dev, info->ai_context.ctrl_reg); tmp = me4000_inl(dev, info->ai_context.ctrl_reg);
tmp &= ~(ME4000_AI_CTRL_BIT_STOP | ME4000_AI_CTRL_BIT_IMMEDIATE_STOP); tmp &= ~(ME4000_AI_CTRL_BIT_STOP | ME4000_AI_CTRL_BIT_IMMEDIATE_STOP);
@ -846,8 +820,6 @@ static int ai_check_chanlist(struct comedi_device *dev,
int aref; int aref;
int i; int i;
CALL_PDEBUG("In ai_check_chanlist()\n");
/* Check whether a channel list is available */ /* Check whether a channel list is available */
if (!cmd->chanlist_len) { if (!cmd->chanlist_len) {
printk(KERN_ERR printk(KERN_ERR
@ -933,8 +905,6 @@ static int ai_round_cmd_args(struct comedi_device *dev,
int rest; int rest;
CALL_PDEBUG("In ai_round_cmd_args()\n");
*init_ticks = 0; *init_ticks = 0;
*scan_ticks = 0; *scan_ticks = 0;
*chan_ticks = 0; *chan_ticks = 0;
@ -994,9 +964,6 @@ static void ai_write_timer(struct comedi_device *dev,
unsigned int init_ticks, unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks) unsigned int scan_ticks, unsigned int chan_ticks)
{ {
CALL_PDEBUG("In ai_write_timer()\n");
me4000_outl(dev, init_ticks - 1, me4000_outl(dev, init_ticks - 1,
info->ai_context.scan_pre_timer_low_reg); info->ai_context.scan_pre_timer_low_reg);
me4000_outl(dev, 0x0, info->ai_context.scan_pre_timer_high_reg); me4000_outl(dev, 0x0, info->ai_context.scan_pre_timer_high_reg);
@ -1020,8 +987,6 @@ static int ai_prepare(struct comedi_device *dev,
unsigned long tmp = 0; unsigned long tmp = 0;
CALL_PDEBUG("In ai_prepare()\n");
/* Write timer arguments */ /* Write timer arguments */
ai_write_timer(dev, init_ticks, scan_ticks, chan_ticks); ai_write_timer(dev, init_ticks, scan_ticks, chan_ticks);
@ -1089,8 +1054,6 @@ static int ai_write_chanlist(struct comedi_device *dev,
unsigned int aref; unsigned int aref;
int i; int i;
CALL_PDEBUG("In ai_write_chanlist()\n");
for (i = 0; i < cmd->chanlist_len; i++) { for (i = 0; i < cmd->chanlist_len; i++) {
chan = CR_CHAN(cmd->chanlist[i]); chan = CR_CHAN(cmd->chanlist[i]);
rang = CR_RANGE(cmd->chanlist[i]); rang = CR_RANGE(cmd->chanlist[i]);
@ -1127,8 +1090,6 @@ static int me4000_ai_do_cmd(struct comedi_device *dev,
unsigned int chan_ticks = 0; unsigned int chan_ticks = 0;
struct comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
CALL_PDEBUG("In me4000_ai_do_cmd()\n");
/* Reset the analog input */ /* Reset the analog input */
err = me4000_ai_cancel(dev, s); err = me4000_ai_cancel(dev, s);
if (err) if (err)
@ -1173,8 +1134,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
unsigned int scan_ticks; unsigned int scan_ticks;
int err = 0; int err = 0;
CALL_PDEBUG("In me4000_ai_do_cmd_test()\n");
PDEBUG("me4000_ai_do_cmd_test(): subdev = %d\n", cmd->subdev); PDEBUG("me4000_ai_do_cmd_test(): subdev = %d\n", cmd->subdev);
PDEBUG("me4000_ai_do_cmd_test(): flags = %08X\n", cmd->flags); PDEBUG("me4000_ai_do_cmd_test(): flags = %08X\n", cmd->flags);
PDEBUG("me4000_ai_do_cmd_test(): start_src = %08X\n", PDEBUG("me4000_ai_do_cmd_test(): start_src = %08X\n",
@ -1717,8 +1676,6 @@ static int me4000_ao_insn_write(struct comedi_device *dev,
int aref = CR_AREF(insn->chanspec); int aref = CR_AREF(insn->chanspec);
unsigned long tmp; unsigned long tmp;
CALL_PDEBUG("In me4000_ao_insn_write()\n");
if (insn->n == 0) { if (insn->n == 0) {
return 0; return 0;
} else if (insn->n > 1) { } else if (insn->n > 1) {
@ -1794,9 +1751,6 @@ static int me4000_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
CALL_PDEBUG("In me4000_dio_insn_bits()\n");
/* Length of data must be 2 (mask and new data, see below) */ /* Length of data must be 2 (mask and new data, see below) */
if (insn->n == 0) if (insn->n == 0)
return 0; return 0;
@ -1851,8 +1805,6 @@ static int me4000_dio_insn_config(struct comedi_device *dev,
unsigned long tmp; unsigned long tmp;
int chan = CR_CHAN(insn->chanspec); int chan = CR_CHAN(insn->chanspec);
CALL_PDEBUG("In me4000_dio_insn_config()\n");
switch (data[0]) { switch (data[0]) {
default: default:
return -EINVAL; return -EINVAL;
@ -1948,9 +1900,6 @@ static int me4000_dio_insn_config(struct comedi_device *dev,
static int cnt_reset(struct comedi_device *dev, unsigned int channel) static int cnt_reset(struct comedi_device *dev, unsigned int channel)
{ {
CALL_PDEBUG("In cnt_reset()\n");
switch (channel) { switch (channel) {
case 0: case 0:
me4000_outb(dev, 0x30, info->cnt_context.ctrl_reg); me4000_outb(dev, 0x30, info->cnt_context.ctrl_reg);
@ -1982,8 +1931,6 @@ static int cnt_config(struct comedi_device *dev, unsigned int channel,
{ {
int tmp = 0; int tmp = 0;
CALL_PDEBUG("In cnt_config()\n");
switch (channel) { switch (channel) {
case 0: case 0:
tmp |= ME4000_CNT_COUNTER_0; tmp |= ME4000_CNT_COUNTER_0;
@ -2041,8 +1988,6 @@ static int me4000_cnt_insn_config(struct comedi_device *dev,
int err; int err;
CALL_PDEBUG("In me4000_cnt_insn_config()\n");
switch (data[0]) { switch (data[0]) {
case GPCT_RESET: case GPCT_RESET:
if (insn->n != 1) { if (insn->n != 1) {
@ -2087,8 +2032,6 @@ static int me4000_cnt_insn_read(struct comedi_device *dev,
unsigned short tmp; unsigned short tmp;
CALL_PDEBUG("In me4000_cnt_insn_read()\n");
if (insn->n == 0) if (insn->n == 0)
return 0; return 0;
@ -2137,8 +2080,6 @@ static int me4000_cnt_insn_write(struct comedi_device *dev,
unsigned short tmp; unsigned short tmp;
CALL_PDEBUG("In me4000_cnt_insn_write()\n");
if (insn->n == 0) { if (insn->n == 0) {
return 0; return 0;
} else if (insn->n > 1) { } else if (insn->n > 1) {
@ -2184,8 +2125,6 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct comedi_subdevice *s; struct comedi_subdevice *s;
int result; int result;
CALL_PDEBUG("In me4000_attach()\n");
result = me4000_probe(dev, it); result = me4000_probe(dev, it);
if (result) if (result)
return result; return result;

View file

@ -28,18 +28,10 @@
Debug section Debug section
===========================================================================*/ ===========================================================================*/
#undef ME4000_CALL_DEBUG /* Debug function entry and exit */
#undef ME4000_PORT_DEBUG /* Debug port access */ #undef ME4000_PORT_DEBUG /* Debug port access */
#undef ME4000_ISR_DEBUG /* Debug the interrupt service routine */ #undef ME4000_ISR_DEBUG /* Debug the interrupt service routine */
#undef ME4000_DEBUG /* General purpose debug masseges */ #undef ME4000_DEBUG /* General purpose debug masseges */
#ifdef ME4000_CALL_DEBUG
#undef CALL_PDEBUG
#define CALL_PDEBUG(fmt, args...) printk(KERN_DEBUG"comedi%d: me4000: " fmt, dev->minor, ##args)
#else
# define CALL_PDEBUG(fmt, args...) /* no debugging, do nothing */
#endif
#ifdef ME4000_PORT_DEBUG #ifdef ME4000_PORT_DEBUG
#undef PORT_PDEBUG #undef PORT_PDEBUG
#define PORT_PDEBUG(fmt, args...) printk(KERN_DEBUG"comedi%d: me4000: " fmt, dev->minor, ##args) #define PORT_PDEBUG(fmt, args...) printk(KERN_DEBUG"comedi%d: me4000: " fmt, dev->minor, ##args)