aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/icp_multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/comedi/drivers/icp_multi.c')
-rw-r--r--drivers/staging/comedi/drivers/icp_multi.c345
1 files changed, 182 insertions, 163 deletions
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c
index 7a67fff42358..fa0e48173bd4 100644
--- a/drivers/staging/comedi/drivers/icp_multi.c
+++ b/drivers/staging/comedi/drivers/icp_multi.c
@@ -46,7 +46,7 @@ There are 4 x 12-bit Analogue Outputs. Ranges : 5V, 10V, +/-5V, +/-10V
Options:
[0] - PCI bus number - if bus number and slot number are 0,
- then driver search for first unused card
+ then driver search for first unused card
[1] - PCI slot number
*/
@@ -133,7 +133,7 @@ static int icp_multi_detach(struct comedi_device *dev);
Data & Structure declarations
==============================================================================
*/
-static unsigned short pci_list_builded = 0; /*>0 list of card is known */
+static unsigned short pci_list_builded; /*>0 list of card is known */
struct boardtype {
const char *name; /* driver name */
@@ -176,13 +176,13 @@ static const struct boardtype boardtypes[] = {
#define n_boardtypes (sizeof(boardtypes)/sizeof(struct boardtype))
static struct comedi_driver driver_icp_multi = {
-driver_name:"icp_multi",
-module:THIS_MODULE,
-attach:icp_multi_attach,
-detach:icp_multi_detach,
-num_names:n_boardtypes,
-board_name:&boardtypes[0].name,
-offset:sizeof(struct boardtype),
+driver_name: "icp_multi",
+module : THIS_MODULE,
+attach : icp_multi_attach,
+detach : icp_multi_detach,
+num_names : n_boardtypes,
+board_name : &boardtypes[0].name,
+offset : sizeof(struct boardtype),
};
COMEDI_INITCLEANUP(driver_icp_multi);
@@ -234,18 +234,18 @@ static int icp_multi_reset(struct comedi_device *dev);
/*
==============================================================================
- Name: icp_multi_insn_read_ai
+Name: icp_multi_insn_read_ai
- Description:
- This function reads a single analogue input.
+Description:
+ This function reads a single analogue input.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to analogue input data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to analogue input data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -256,7 +256,7 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev,
int n, timeout;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: BGN: icp_multi_insn_read_ai(...)\n");
+ printk(KERN_DEBUG "icp multi EDBG: BGN: icp_multi_insn_read_ai(...)\n");
#endif
/* Disable A/D conversion ready interrupt */
devpriv->IntEnable &= ~ADC_READY;
@@ -266,11 +266,11 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev,
devpriv->IntStatus |= ADC_READY;
writew(devpriv->IntStatus, devpriv->io_addr + ICP_MULTI_INT_STAT);
- /* Set up appropriate channel, mode and range data, for specified channel */
+ /* Set up appropriate channel, mode and range data, for specified ch */
setup_channel_list(dev, s, &insn->chanspec, 1);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp_multi A ST=%4x IO=%p\n",
+ printk(KERN_DEBUG "icp_multi A ST=%4x IO=%p\n",
readw(devpriv->io_addr + ICP_MULTI_ADC_CSR),
devpriv->io_addr + ICP_MULTI_ADC_CSR);
#endif
@@ -283,14 +283,14 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev,
devpriv->AdcCmdStatus &= ~ADC_ST;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi B n=%d ST=%4x\n", n,
+ printk(KERN_DEBUG "icp multi B n=%d ST=%4x\n", n,
readw(devpriv->io_addr + ICP_MULTI_ADC_CSR));
#endif
udelay(1);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi C n=%d ST=%4x\n", n,
+ printk(KERN_DEBUG "icp multi C n=%d ST=%4x\n", n,
readw(devpriv->io_addr + ICP_MULTI_ADC_CSR));
#endif
@@ -303,7 +303,8 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev,
#ifdef ICP_MULTI_EXTDEBUG
if (!(timeout % 10))
- printk("icp multi D n=%d tm=%d ST=%4x\n", n,
+ printk(KERN_DEBUG
+ "icp multi D n=%d tm=%d ST=%4x\n", n,
timeout,
readw(devpriv->io_addr +
ICP_MULTI_ADC_CSR));
@@ -328,9 +329,9 @@ static int icp_multi_insn_read_ai(struct comedi_device *dev,
data[n] = 0;
#ifdef ICP_MULTI_EXTDEBUG
- printk
- ("icp multi EDBG: END: icp_multi_insn_read_ai(...) n=%d\n",
- n);
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: icp_multi_insn_read_ai(...) n=%d\n",
+ n);
#endif
return -ETIME;
@@ -348,7 +349,8 @@ conv_finish:
writew(devpriv->IntStatus, devpriv->io_addr + ICP_MULTI_INT_STAT);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: icp_multi_insn_read_ai(...) n=%d\n", n);
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: icp_multi_insn_read_ai(...) n=%d\n", n);
#endif
return n;
}
@@ -356,18 +358,18 @@ conv_finish:
/*
==============================================================================
- Name: icp_multi_insn_write_ao
+Name: icp_multi_insn_write_ao
- Description:
- This function writes a single analogue output.
+Description:
+ This function writes a single analogue output.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to analogue output data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to analogue output data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -378,7 +380,8 @@ static int icp_multi_insn_write_ao(struct comedi_device *dev,
int n, chan, range, timeout;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: BGN: icp_multi_insn_write_ao(...)\n");
+ printk(KERN_DEBUG
+ "icp multi EDBG: BGN: icp_multi_insn_write_ao(...)\n");
#endif
/* Disable D/A conversion ready interrupt */
devpriv->IntEnable &= ~DAC_READY;
@@ -404,7 +407,8 @@ static int icp_multi_insn_write_ao(struct comedi_device *dev,
writew(devpriv->DacCmdStatus, devpriv->io_addr + ICP_MULTI_DAC_CSR);
for (n = 0; n < insn->n; n++) {
- /* Wait for analogue output data register to be ready for new data, or get fed up waiting */
+ /* Wait for analogue output data register to be
+ * ready for new data, or get fed up waiting */
timeout = 100;
while (timeout--) {
if (!(readw(devpriv->io_addr +
@@ -413,7 +417,8 @@ static int icp_multi_insn_write_ao(struct comedi_device *dev,
#ifdef ICP_MULTI_EXTDEBUG
if (!(timeout % 10))
- printk("icp multi A n=%d tm=%d ST=%4x\n", n,
+ printk(KERN_DEBUG
+ "icp multi A n=%d tm=%d ST=%4x\n", n,
timeout,
readw(devpriv->io_addr +
ICP_MULTI_DAC_CSR));
@@ -438,8 +443,8 @@ static int icp_multi_insn_write_ao(struct comedi_device *dev,
devpriv->ao_data[chan] = 0;
#ifdef ICP_MULTI_EXTDEBUG
- printk
- ("icp multi EDBG: END: icp_multi_insn_write_ao(...) n=%d\n",
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: icp_multi_insn_write_ao(...) n=%d\n",
n);
#endif
return -ETIME;
@@ -459,7 +464,8 @@ dac_ready:
}
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: icp_multi_insn_write_ao(...) n=%d\n", n);
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: icp_multi_insn_write_ao(...) n=%d\n", n);
#endif
return n;
}
@@ -467,18 +473,18 @@ dac_ready:
/*
==============================================================================
- Name: icp_multi_insn_read_ao
+Name: icp_multi_insn_read_ao
- Description:
- This function reads a single analogue output.
+Description:
+ This function reads a single analogue output.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to analogue output data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to analogue output data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -501,18 +507,18 @@ static int icp_multi_insn_read_ao(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_insn_bits_di
+Name: icp_multi_insn_bits_di
- Description:
- This function reads the digital inputs.
+Description:
+ This function reads the digital inputs.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to analogue output data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to analogue output data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -528,18 +534,18 @@ static int icp_multi_insn_bits_di(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_insn_bits_do
+Name: icp_multi_insn_bits_do
- Description:
- This function writes the appropriate digital outputs.
+Description:
+ This function writes the appropriate digital outputs.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to analogue output data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to analogue output data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -548,14 +554,14 @@ static int icp_multi_insn_bits_do(struct comedi_device *dev,
struct comedi_insn *insn, unsigned int *data)
{
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: BGN: icp_multi_insn_bits_do(...)\n");
+ printk(KERN_DEBUG "icp multi EDBG: BGN: icp_multi_insn_bits_do(...)\n");
#endif
if (data[0]) {
s->state &= ~data[0];
s->state |= (data[0] & data[1]);
- printk("Digital outputs = %4x \n", s->state);
+ printk(KERN_DEBUG "Digital outputs = %4x \n", s->state);
writew(s->state, devpriv->io_addr + ICP_MULTI_DO);
}
@@ -563,7 +569,7 @@ static int icp_multi_insn_bits_do(struct comedi_device *dev,
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: icp_multi_insn_bits_do(...)\n");
+ printk(KERN_DEBUG "icp multi EDBG: END: icp_multi_insn_bits_do(...)\n");
#endif
return 2;
}
@@ -571,18 +577,18 @@ static int icp_multi_insn_bits_do(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_insn_read_ctr
+Name: icp_multi_insn_read_ctr
- Description:
- This function reads the specified counter.
+Description:
+ This function reads the specified counter.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to counter data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to counter data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -596,18 +602,18 @@ static int icp_multi_insn_read_ctr(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_insn_write_ctr
+Name: icp_multi_insn_write_ctr
- Description:
- This function write to the specified counter.
+Description:
+ This function write to the specified counter.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- struct comedi_insn *insn Pointer to current comedi instruction
- unsigned int *data Pointer to counter data
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ struct comedi_insn *insn Pointer to current comedi instruction
+ unsigned int *data Pointer to counter data
- Returns:int Nmuber of instructions executed
+Returns:int Nmuber of instructions executed
==============================================================================
*/
@@ -622,15 +628,15 @@ static int icp_multi_insn_write_ctr(struct comedi_device *dev,
/*
==============================================================================
- Name: interrupt_service_icp_multi
+Name: interrupt_service_icp_multi
- Description:
- This function is the interrupt service routine for all
- interrupts generated by the icp multi board.
+Description:
+ This function is the interrupt service routine for all
+ interrupts generated by the icp multi board.
- Parameters:
- int irq
- void *d Pointer to current device
+Parameters:
+ int irq
+ void *d Pointer to current device
==============================================================================
*/
@@ -640,7 +646,8 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d)
int int_no;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: BGN: interrupt_service_icp_multi(%d,...)\n",
+ printk(KERN_DEBUG
+ "icp multi EDBG: BGN: interrupt_service_icp_multi(%d,...)\n",
irq);
#endif
@@ -651,7 +658,8 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d)
return IRQ_NONE;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: interrupt_service_icp_multi() ST: %4x\n",
+ printk(KERN_DEBUG
+ "icp multi EDBG: interrupt_service_icp_multi() ST: %4x\n",
readw(devpriv->io_addr + ICP_MULTI_INT_STAT));
#endif
@@ -679,7 +687,8 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d)
}
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: interrupt_service_icp_multi(...)\n");
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: interrupt_service_icp_multi(...)\n");
#endif
return IRQ_HANDLED;
}
@@ -688,20 +697,20 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d)
/*
==============================================================================
- Name: check_channel_list
+Name: check_channel_list
- Description:
- This function checks if the channel list, provided by user
- is built correctly
+Description:
+ This function checks if the channel list, provided by user
+ is built correctly
- Parameters:
- struct comedi_device *dev Pointer to current sevice structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- unsigned int *chanlist Pointer to packed channel list
- unsigned int n_chan Number of channels to scan
+Parameters:
+ struct comedi_device *dev Pointer to current sevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ unsigned int *chanlist Pointer to packed channel list
+ unsigned int n_chan Number of channels to scan
- Returns:int 0 = failure
- 1 = success
+Returns:int 0 = failure
+ 1 = success
==============================================================================
*/
@@ -712,7 +721,8 @@ static int check_channel_list(struct comedi_device *dev,
unsigned int i;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: check_channel_list(...,%d)\n", n_chan);
+ printk(KERN_DEBUG
+ "icp multi EDBG: check_channel_list(...,%d)\n", n_chan);
#endif
/* Check that we at least have one channel to check */
if (n_chan < 1) {
@@ -725,7 +735,7 @@ static int check_channel_list(struct comedi_device *dev,
if (CR_AREF(chanlist[i]) == AREF_DIFF) {
if (CR_CHAN(chanlist[i]) > this_board->n_aichand) {
comedi_error(dev,
- "Incorrect differential ai channel number");
+ "Incorrect differential ai ch-nr");
return 0;
}
} else {
@@ -743,20 +753,20 @@ static int check_channel_list(struct comedi_device *dev,
/*
==============================================================================
- Name: setup_channel_list
+Name: setup_channel_list
- Description:
- This function sets the appropriate channel selection,
- differential input mode and range bits in the ADC Command/
- Status register.
+Description:
+ This function sets the appropriate channel selection,
+ differential input mode and range bits in the ADC Command/
+ Status register.
- Parameters:
- struct comedi_device *dev Pointer to current sevice structure
- struct comedi_subdevice *s Pointer to current subdevice structure
- unsigned int *chanlist Pointer to packed channel list
- unsigned int n_chan Number of channels to scan
+Parameters:
+ struct comedi_device *dev Pointer to current sevice structure
+ struct comedi_subdevice *s Pointer to current subdevice structure
+ unsigned int *chanlist Pointer to packed channel list
+ unsigned int n_chan Number of channels to scan
- Returns:Void
+Returns:Void
==============================================================================
*/
@@ -768,7 +778,8 @@ static void setup_channel_list(struct comedi_device *dev,
unsigned int diff;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: setup_channel_list(...,%d)\n", n_chan);
+ printk(KERN_DEBUG
+ "icp multi EDBG: setup_channel_list(...,%d)\n", n_chan);
#endif
devpriv->act_chanlist_len = n_chan;
devpriv->act_chanlist_pos = 0;
@@ -786,7 +797,8 @@ static void setup_channel_list(struct comedi_device *dev,
chanprog &= 0x000f;
}
- /* Clear channel, range and input mode bits in A/D command/status register */
+ /* Clear channel, range and input mode bits
+ * in A/D command/status register */
devpriv->AdcCmdStatus &= 0xf00f;
/* Set channel number and differential mode status bit */
@@ -808,7 +820,8 @@ static void setup_channel_list(struct comedi_device *dev,
devpriv->io_addr + ICP_MULTI_ADC_CSR);
#ifdef ICP_MULTI_EXTDEBUG
- printk("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range,
+ printk(KERN_DEBUG
+ "GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range,
devpriv->act_chanlist[i]);
#endif
}
@@ -818,15 +831,15 @@ static void setup_channel_list(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_reset
+Name: icp_multi_reset
- Description:
- This function resets the icp multi device to a 'safe' state
+Description:
+ This function resets the icp multi device to a 'safe' state
- Parameters:
- struct comedi_device *dev Pointer to current sevice structure
+Parameters:
+ struct comedi_device *dev Pointer to current sevice structure
- Returns:int 0 = success
+Returns:int 0 = success
==============================================================================
*/
@@ -835,7 +848,8 @@ static int icp_multi_reset(struct comedi_device *dev)
unsigned int i;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp_multi EDBG: BGN: icp_multi_reset(...)\n");
+ printk(KERN_DEBUG
+ "icp_multi EDBG: BGN: icp_multi_reset(...)\n");
#endif
/* Clear INT enables and requests */
writew(0, devpriv->io_addr + ICP_MULTI_INT_EN);
@@ -866,7 +880,8 @@ static int icp_multi_reset(struct comedi_device *dev)
writew(0, devpriv->io_addr + ICP_MULTI_DO);
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: icp_multi_reset(...)\n");
+ printk(KERN_DEBUG
+ "icp multi EDBG: END: icp_multi_reset(...)\n");
#endif
return 0;
}
@@ -874,17 +889,17 @@ static int icp_multi_reset(struct comedi_device *dev)
/*
==============================================================================
- Name: icp_multi_attach
+Name: icp_multi_attach
- Description:
- This function sets up all the appropriate data for the current
- device.
+Description:
+ This function sets up all the appropriate data for the current
+ device.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
- struct comedi_devconfig *it Pointer to current device configuration
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
+ struct comedi_devconfig *it Pointer to current device configuration
- Returns:int 0 = success
+Returns:int 0 = success
==============================================================================
*/
@@ -898,7 +913,8 @@ static int icp_multi_attach(struct comedi_device *dev,
resource_size_t io_addr[5], iobase;
unsigned char pci_bus, pci_slot, pci_func;
- printk("icp_multi EDBG: BGN: icp_multi_attach(...)\n");
+ printk(KERN_WARNING
+ "icp_multi EDBG: BGN: icp_multi_attach(...)\n");
/* Alocate private data storage space */
ret = alloc_private(dev, sizeof(struct icp_multi_private));
@@ -916,7 +932,8 @@ static int icp_multi_attach(struct comedi_device *dev,
);
}
- printk("Anne's comedi%d: icp_multi: board=%s", dev->minor,
+ printk(KERN_WARNING
+ "Anne's comedi%d: icp_multi: board=%s", dev->minor,
this_board->name);
card = select_and_alloc_pci_card(PCI_VENDOR_ID_ICP,
@@ -930,24 +947,26 @@ static int icp_multi_attach(struct comedi_device *dev,
if ((pci_card_data(card, &pci_bus, &pci_slot, &pci_func, &io_addr[0],
&irq)) < 0) {
- printk(" - Can't get configuration data!\n");
+ printk(KERN_WARNING " - Can't get configuration data!\n");
return -EIO;
}
iobase = io_addr[2];
devpriv->phys_iobase = iobase;
- printk(", b:s:f=%d:%d:%d, io=0x%8llx \n", pci_bus, pci_slot, pci_func,
+ printk(KERN_WARNING
+ ", b:s:f=%d:%d:%d, io=0x%8llx \n", pci_bus, pci_slot, pci_func,
(unsigned long long)iobase);
devpriv->io_addr = ioremap(iobase, ICP_MULTI_SIZE);
if (devpriv->io_addr == NULL) {
- printk("ioremap failed.\n");
+ printk(KERN_WARNING "ioremap failed.\n");
return -ENOMEM;
}
#ifdef ICP_MULTI_EXTDEBUG
- printk("0x%08llx mapped to %p, ", (unsigned long long)iobase,
+ printk(KERN_DEBUG
+ "0x%08llx mapped to %p, ", (unsigned long long)iobase,
devpriv->io_addr);
#endif
@@ -975,20 +994,20 @@ static int icp_multi_attach(struct comedi_device *dev,
if (irq) {
if (request_irq(irq, interrupt_service_icp_multi,
IRQF_SHARED, "Inova Icp Multi", dev)) {
- printk
- (", unable to allocate IRQ %u, DISABLING IT",
+ printk(KERN_WARNING
+ "unable to allocate IRQ %u, DISABLING IT",
irq);
irq = 0; /* Can't use IRQ */
} else
- printk(", irq=%u", irq);
+ printk(KERN_WARNING ", irq=%u", irq);
} else
- printk(", IRQ disabled");
+ printk(KERN_WARNING ", IRQ disabled");
} else
irq = 0;
dev->irq = irq;
- printk(".\n");
+ printk(KERN_WARNING ".\n");
subdev = 0;
@@ -1063,7 +1082,7 @@ static int icp_multi_attach(struct comedi_device *dev,
devpriv->valid = 1;
#ifdef ICP_MULTI_EXTDEBUG
- printk("icp multi EDBG: END: icp_multi_attach(...)\n");
+ printk(KERN_DEBUG "icp multi EDBG: END: icp_multi_attach(...)\n");
#endif
return 0;
@@ -1072,16 +1091,16 @@ static int icp_multi_attach(struct comedi_device *dev,
/*
==============================================================================
- Name: icp_multi_detach
+Name: icp_multi_detach
- Description:
- This function releases all the resources used by the current
- device.
+Description:
+ This function releases all the resources used by the current
+ device.
- Parameters:
- struct comedi_device *dev Pointer to current device structure
+Parameters:
+ struct comedi_device *dev Pointer to current device structure
- Returns:int 0 = success
+Returns:int 0 = success
==============================================================================
*/