Commit e473e912 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Change "foo * bar" to "foo *bar"

Removes checkpatch.pl errors
Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b6c77757
......@@ -47,13 +47,13 @@
#include <asm/io.h>
#include <asm/system.h>
static int postconfig(comedi_device * dev);
static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int postconfig(comedi_device *dev);
static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static void *comedi_recognize(comedi_driver * driv, const char *name);
static void comedi_report_boards(comedi_driver * driv);
static int poll_invalid(comedi_device * dev, comedi_subdevice * s);
int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
static void comedi_report_boards(comedi_driver *driv);
static int poll_invalid(comedi_device *dev, comedi_subdevice *s);
int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
unsigned long new_size);
comedi_driver *comedi_drivers;
......@@ -63,7 +63,7 @@ int comedi_modprobe(int minor)
return -EINVAL;
}
static void cleanup_device(comedi_device * dev)
static void cleanup_device(comedi_device *dev)
{
int i;
comedi_subdevice *s;
......@@ -97,7 +97,7 @@ static void cleanup_device(comedi_device * dev)
comedi_set_hw_dev(dev, NULL);
}
static void __comedi_device_detach(comedi_device * dev)
static void __comedi_device_detach(comedi_device *dev)
{
dev->attached = 0;
if (dev->driver) {
......@@ -108,14 +108,14 @@ static void __comedi_device_detach(comedi_device * dev)
cleanup_device(dev);
}
void comedi_device_detach(comedi_device * dev)
void comedi_device_detach(comedi_device *dev)
{
if (!dev->attached)
return;
__comedi_device_detach(dev);
}
int comedi_device_attach(comedi_device * dev, comedi_devconfig * it)
int comedi_device_attach(comedi_device *dev, comedi_devconfig *it)
{
comedi_driver *driv;
int ret;
......@@ -182,7 +182,7 @@ int comedi_device_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
int comedi_driver_register(comedi_driver * driver)
int comedi_driver_register(comedi_driver *driver)
{
driver->next = comedi_drivers;
comedi_drivers = driver;
......@@ -190,7 +190,7 @@ int comedi_driver_register(comedi_driver * driver)
return 0;
}
int comedi_driver_unregister(comedi_driver * driver)
int comedi_driver_unregister(comedi_driver *driver)
{
comedi_driver *prev;
int i;
......@@ -226,7 +226,7 @@ int comedi_driver_unregister(comedi_driver * driver)
return -EINVAL;
}
static int postconfig(comedi_device * dev)
static int postconfig(comedi_device *dev)
{
int i;
comedi_subdevice *s;
......@@ -315,7 +315,7 @@ void *comedi_recognize(comedi_driver * driv, const char *name)
return NULL;
}
void comedi_report_boards(comedi_driver * driv)
void comedi_report_boards(comedi_driver *driv)
{
unsigned int i;
const char *const *name_ptr;
......@@ -333,19 +333,19 @@ void comedi_report_boards(comedi_driver * driv)
printk(" %s\n", driv->driver_name);
}
static int poll_invalid(comedi_device * dev, comedi_subdevice * s)
static int poll_invalid(comedi_device *dev, comedi_subdevice *s)
{
return -EINVAL;
}
int insn_inval(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
int insn_inval(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
return -EINVAL;
}
static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
comedi_insn new_insn;
int ret;
......@@ -381,7 +381,7 @@ static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
return 1;
}
static inline unsigned long uvirt_to_kva(pgd_t * pgd, unsigned long adr)
static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
{
unsigned long ret = 0UL;
pmd_t *pmd;
......@@ -414,7 +414,7 @@ static inline unsigned long kvirt_to_kva(unsigned long adr)
return kva;
}
int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
unsigned long new_size)
{
comedi_async *async = s->async;
......@@ -538,7 +538,7 @@ int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
/* munging is applied to data by core as it passes between user
* and kernel space */
unsigned int comedi_buf_munge(comedi_async * async, unsigned int num_bytes)
unsigned int comedi_buf_munge(comedi_async *async, unsigned int num_bytes)
{
comedi_subdevice *s = async->subdevice;
unsigned int count = 0;
......@@ -582,7 +582,7 @@ unsigned int comedi_buf_munge(comedi_async * async, unsigned int num_bytes)
return count;
}
unsigned int comedi_buf_write_n_available(comedi_async * async)
unsigned int comedi_buf_write_n_available(comedi_async *async)
{
unsigned int free_end;
unsigned int nbytes;
......@@ -602,7 +602,7 @@ unsigned int comedi_buf_write_n_available(comedi_async * async)
}
/* allocates chunk for the writer from free buffer space */
unsigned int comedi_buf_write_alloc(comedi_async * async, unsigned int nbytes)
unsigned int comedi_buf_write_alloc(comedi_async *async, unsigned int nbytes)
{
unsigned int free_end = async->buf_read_count + async->prealloc_bufsz;
......@@ -617,7 +617,7 @@ unsigned int comedi_buf_write_alloc(comedi_async * async, unsigned int nbytes)
}
/* allocates nothing unless it can completely fulfill the request */
unsigned int comedi_buf_write_alloc_strict(comedi_async * async,
unsigned int comedi_buf_write_alloc_strict(comedi_async *async,
unsigned int nbytes)
{
unsigned int free_end = async->buf_read_count + async->prealloc_bufsz;
......@@ -633,7 +633,7 @@ unsigned int comedi_buf_write_alloc_strict(comedi_async * async,
}
/* transfers a chunk from writer to filled buffer space */
unsigned comedi_buf_write_free(comedi_async * async, unsigned int nbytes)
unsigned comedi_buf_write_free(comedi_async *async, unsigned int nbytes)
{
if ((int)(async->buf_write_count + nbytes -
async->buf_write_alloc_count) > 0) {
......@@ -651,7 +651,7 @@ unsigned comedi_buf_write_free(comedi_async * async, unsigned int nbytes)
}
/* allocates a chunk for the reader from filled (and munged) buffer space */
unsigned comedi_buf_read_alloc(comedi_async * async, unsigned nbytes)
unsigned comedi_buf_read_alloc(comedi_async *async, unsigned nbytes)
{
if ((int)(async->buf_read_alloc_count + nbytes - async->munge_count) >
0) {
......@@ -665,7 +665,7 @@ unsigned comedi_buf_read_alloc(comedi_async * async, unsigned nbytes)
}
/* transfers control of a chunk from reader to free buffer space */
unsigned comedi_buf_read_free(comedi_async * async, unsigned int nbytes)
unsigned comedi_buf_read_free(comedi_async *async, unsigned int nbytes)
{
/* barrier insures data has been read out of buffer before read count is incremented */
smp_mb();
......@@ -681,7 +681,7 @@ unsigned comedi_buf_read_free(comedi_async * async, unsigned int nbytes)
return nbytes;
}
void comedi_buf_memcpy_to(comedi_async * async, unsigned int offset,
void comedi_buf_memcpy_to(comedi_async *async, unsigned int offset,
const void *data, unsigned int num_bytes)
{
unsigned int write_ptr = async->buf_write_ptr + offset;
......@@ -706,7 +706,7 @@ void comedi_buf_memcpy_to(comedi_async * async, unsigned int offset,
}
}
void comedi_buf_memcpy_from(comedi_async * async, unsigned int offset,
void comedi_buf_memcpy_from(comedi_async *async, unsigned int offset,
void *dest, unsigned int nbytes)
{
void *src;
......@@ -732,7 +732,7 @@ void comedi_buf_memcpy_from(comedi_async * async, unsigned int offset,
}
}
unsigned int comedi_buf_read_n_available(comedi_async * async)
unsigned int comedi_buf_read_n_available(comedi_async *async)
{
unsigned num_bytes;
......@@ -747,7 +747,7 @@ unsigned int comedi_buf_read_n_available(comedi_async * async)
return num_bytes;
}
int comedi_buf_get(comedi_async * async, sampl_t * x)
int comedi_buf_get(comedi_async *async, sampl_t *x)
{
unsigned int n = comedi_buf_read_n_available(async);
......@@ -759,7 +759,7 @@ int comedi_buf_get(comedi_async * async, sampl_t * x)
return 1;
}
int comedi_buf_put(comedi_async * async, sampl_t x)
int comedi_buf_put(comedi_async *async, sampl_t x)
{
unsigned int n = comedi_buf_write_alloc_strict(async, sizeof(sampl_t));
......@@ -772,7 +772,7 @@ int comedi_buf_put(comedi_async * async, sampl_t x)
return 1;
}
void comedi_reset_async_buf(comedi_async * async)
void comedi_reset_async_buf(comedi_async *async)
{
async->buf_write_alloc_count = 0;
async->buf_write_count = 0;
......
......@@ -123,8 +123,8 @@ static const char range_codes_analog[] = { 0x00, 0x20, 0x10, 0x30 };
Forward declarations
==============================================================================
*/
static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it);
static int icp_multi_detach(comedi_device * dev);
static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it);
static int icp_multi_detach(comedi_device *dev);
/*
==============================================================================
......@@ -214,12 +214,12 @@ typedef struct {
*/
#if 0
static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
#endif
static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
static int icp_multi_reset(comedi_device * dev);
static int icp_multi_reset(comedi_device *dev);
/*
==============================================================================
......@@ -245,8 +245,8 @@ static int icp_multi_reset(comedi_device * dev);
==============================================================================
*/
static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_read_ai(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
int n, timeout;
......@@ -364,8 +364,8 @@ static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_write_ao(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
int n, chan, range, timeout;
......@@ -472,8 +472,8 @@ static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_read_ao(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
int n, chan;
......@@ -505,8 +505,8 @@ static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_bits_di(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
......@@ -531,8 +531,8 @@ static int icp_multi_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_bits_do(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
#ifdef ICP_MULTI_EXTDEBUG
printk("icp multi EDBG: BGN: icp_multi_insn_bits_do(...)\n");
......@@ -573,8 +573,8 @@ static int icp_multi_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_read_ctr(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
return 0;
}
......@@ -597,8 +597,8 @@ static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
static int icp_multi_insn_write_ctr(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data)
{
return 0;
}
......@@ -689,7 +689,7 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d PT_REGS_ARG)
==============================================================================
*/
static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i;
......@@ -743,7 +743,7 @@ static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i, range, chanprog;
......@@ -812,7 +812,7 @@ static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
==============================================================================
*/
static int icp_multi_reset(comedi_device * dev)
static int icp_multi_reset(comedi_device *dev)
{
unsigned int i;
......@@ -870,7 +870,7 @@ static int icp_multi_reset(comedi_device * dev)
==============================================================================
*/
static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it)
static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
{
comedi_subdevice *s;
int ret, subdev, n_subdevices;
......@@ -1061,7 +1061,7 @@ static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it)
==============================================================================
*/
static int icp_multi_detach(comedi_device * dev)
static int icp_multi_detach(comedi_device *dev)
{
if (dev->private)
......
This diff is collapsed.
......@@ -103,7 +103,7 @@ static void dump_chip_signature(u32 csigr_bits)
printk("mite: num channels = %i, write post fifo depth = %i, wins = %i, iowins = %i\n", mite_csigr_dmac(csigr_bits), mite_csigr_wpdep(csigr_bits), mite_csigr_wins(csigr_bits), mite_csigr_iowins(csigr_bits));
}
unsigned mite_fifo_size(struct mite_struct * mite, unsigned channel)
unsigned mite_fifo_size(struct mite_struct *mite, unsigned channel)
{
unsigned fcr_bits = readl(mite->mite_io_addr +
MITE_FCR(channel));
......@@ -459,7 +459,7 @@ u32 mite_device_bytes_transferred(struct mite_channel *mite_chan)
return readl(mite->mite_io_addr + MITE_DAR(mite_chan->channel));
}
u32 mite_bytes_in_transit(struct mite_channel * mite_chan)
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
{
struct mite_struct *mite = mite_chan->mite;
return readl(mite->mite_io_addr +
......@@ -467,7 +467,7 @@ u32 mite_bytes_in_transit(struct mite_channel * mite_chan)
}
/* returns lower bound for number of bytes transferred from device to memory */
u32 mite_bytes_written_to_memory_lb(struct mite_channel * mite_chan)
u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan)
{
u32 device_byte_count;
......@@ -476,7 +476,7 @@ u32 mite_bytes_written_to_memory_lb(struct mite_channel * mite_chan)
}
/* returns upper bound for number of bytes transferred from device to memory */
u32 mite_bytes_written_to_memory_ub(struct mite_channel * mite_chan)
u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan)
{
u32 in_transit_count;
......@@ -485,7 +485,7 @@ u32 mite_bytes_written_to_memory_ub(struct mite_channel * mite_chan)
}
/* returns lower bound for number of bytes read from memory for transfer to device */
u32 mite_bytes_read_from_memory_lb(struct mite_channel * mite_chan)
u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan)
{
u32 device_byte_count;
......@@ -494,7 +494,7 @@ u32 mite_bytes_read_from_memory_lb(struct mite_channel * mite_chan)
}
/* returns upper bound for number of bytes read from memory for transfer to device */
u32 mite_bytes_read_from_memory_ub(struct mite_channel * mite_chan)
u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
{
u32 in_transit_count;
......
......@@ -162,7 +162,7 @@ void mite_setregs(struct mite_struct *mite, unsigned long ll_start, int chan,
void mite_prep_dma(struct mite_channel *mite_chan,
unsigned int num_device_bits, unsigned int num_memory_bits);
int mite_buf_change(struct mite_dma_descriptor_ring *ring,
comedi_async * async);
comedi_async *async);
#ifdef DEBUG_MITE
void mite_print_chsr(unsigned int chsr);
......
......@@ -680,8 +680,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
static int rtd_attach(comedi_device * dev, comedi_devconfig * it);
static int rtd_detach(comedi_device * dev);
static int rtd_attach(comedi_device *dev, comedi_devconfig *it);
static int rtd_detach(comedi_device *dev);
static comedi_driver rtd520Driver = {
driver_name: DRV_NAME,
......@@ -690,20 +690,20 @@ static comedi_driver rtd520Driver = {
detach:rtd_detach,
};
static int rtd_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int rtd_ao_winsn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int rtd_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int rtd_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int rtd_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data);
static int rtd_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s);
static int rtd_ai_cancel(comedi_device * dev, comedi_subdevice * s);
static int rtd_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int rtd_ao_winsn(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int rtd_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int rtd_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int rtd_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, lsampl_t *data);
static int rtd_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s);
static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s);
/* static int rtd_ai_poll (comedi_device *dev,comedi_subdevice *s); */
static int rtd_ns_to_timer(unsigned int *ns, int roundMode);
static irqreturn_t rtd_interrupt(int irq, void *d PT_REGS_ARG);
......@@ -715,7 +715,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev);
* in the driver structure, dev->board_ptr contains that
* address.
*/
static int rtd_attach(comedi_device * dev, comedi_devconfig * it)
static int rtd_attach(comedi_device *dev, comedi_devconfig *it)
{ /* board name and options flags */
comedi_subdevice *s;
struct pci_dev *pcidev;
......@@ -1057,7 +1057,7 @@ static int rtd_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
static int rtd_detach(comedi_device * dev)
static int rtd_detach(comedi_device *dev)
{
#ifdef USE_DMA
int index;
......@@ -1137,7 +1137,7 @@ static int rtd_detach(comedi_device * dev)
/*
Convert a single comedi channel-gain entry to a RTD520 table entry
*/
static unsigned short rtdConvertChanGain(comedi_device * dev,
static unsigned short rtdConvertChanGain(comedi_device *dev,
unsigned int comediChan, int chanIndex)
{ /* index in channel list */
unsigned int chan, range, aref;
......@@ -1187,7 +1187,7 @@ static unsigned short rtdConvertChanGain(comedi_device * dev,
/*
Setup the channel-gain table from a comedi list
*/
static void rtd_load_channelgain_list(comedi_device * dev,
static void rtd_load_channelgain_list(comedi_device *dev,
unsigned int n_chan, unsigned int *list)
{
if (n_chan > 1) { /* setup channel gain table */
......@@ -1251,8 +1251,8 @@ static int rtd520_probe_fifo_depth(comedi_device *dev)
Note, we don't do any settling delays. Use a instruction list to
select, delay, then read.
*/
static int rtd_ai_rinsn(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
static int rtd_ai_rinsn(comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
int n, ii;
int stat;
......@@ -1304,7 +1304,7 @@ static int rtd_ai_rinsn(comedi_device * dev,
The manual claims that we can do a lword read, but it doesn't work here.
*/
static int ai_read_n(comedi_device * dev, comedi_subdevice * s, int count)
static int ai_read_n(comedi_device *dev, comedi_subdevice *s, int count)
{
int ii;
......@@ -1343,7 +1343,7 @@ static int ai_read_n(comedi_device * dev, comedi_subdevice * s, int count)
/*
unknown amout of data is waiting in fifo.
*/
static int ai_read_dregs(comedi_device * dev, comedi_subdevice * s)
static int ai_read_dregs(comedi_device *dev, comedi_subdevice *s)
{
while (RtdFifoStatus(dev) & FS_ADC_NOT_EMPTY) { /* 1 -> not empty */
sampl_t sample;
......@@ -1372,7 +1372,7 @@ static int ai_read_dregs(comedi_device * dev, comedi_subdevice * s)
/*
Terminate a DMA transfer and wait for everything to quiet down
*/
void abort_dma(comedi_device * dev, unsigned int channel)
void abort_dma(comedi_device *dev, unsigned int channel)
{ /* DMA channel 0, 1 */
unsigned long dma_cs_addr; /* the control/status register */
uint8_t status;
......@@ -1431,7 +1431,7 @@ void abort_dma(comedi_device * dev, unsigned int channel)
Process what is in the DMA transfer buffer and pass to comedi
Note: this is not re-entrant
*/
static int ai_process_dma(comedi_device * dev, comedi_subdevice * s)
static int ai_process_dma(comedi_device *dev, comedi_subdevice *s)
{
int ii, n;
s16 *dp;
......@@ -1645,7 +1645,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
/*
return the number of samples available
*/
static int rtd_ai_poll(comedi_device * dev, comedi_subdevice * s)
static int rtd_ai_poll(comedi_device *dev, comedi_subdevice *s)
{
/* TODO: This needs to mask interrupts, read_dregs, and then re-enable */
/* Not sure what to do if DMA is active */
......@@ -1662,8 +1662,8 @@ static int rtd_ai_poll(comedi_device * dev, comedi_subdevice * s)
the command passes.
*/
static int rtd_ai_cmdtest(comedi_device * dev,
comedi_subdevice * s, comedi_cmd * cmd)
static int rtd_ai_cmdtest(comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
int err = 0;
int tmp;
......@@ -1867,7 +1867,7 @@ static int rtd_ai_cmdtest(comedi_device * dev,
This is usually done by an interrupt handler.
Userland gets to the data using read calls.
*/
static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s)
static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
int timer;
......@@ -2064,7 +2064,7 @@ static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s)
/*
Stop a running data aquisition.
*/
static int rtd_ai_cancel(comedi_device * dev, comedi_subdevice * s)
static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s)
{
u16 status;
......@@ -2132,8 +2132,8 @@ static int rtd_ns_to_timer(unsigned int *ns, int round_mode)
/*
Output one (or more) analog values to a single port as fast as possible.
*/
static int rtd_ao_winsn(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
static int rtd_ao_winsn(comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
......@@ -2187,8 +2187,8 @@ static int rtd_ao_winsn(comedi_device * dev,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
static int rtd_ao_rinsn(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
static int rtd_ao_rinsn(comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
......@@ -2210,8 +2210,8 @@ static int rtd_ao_rinsn(comedi_device * dev,
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write
*/
static int rtd_dio_insn_bits(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
static int rtd_dio_insn_bits(comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
if (insn->n != 2)
return -EINVAL;
......@@ -2237,8 +2237,8 @@ static int rtd_dio_insn_bits(comedi_device * dev,
/*
Configure one bit on a IO port as Input or Output (hence the name :-).
*/
static int rtd_dio_insn_config(comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
static int rtd_dio_insn_config(comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
int chan = CR_CHAN(insn->chanspec);
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
#include <linux/string.h>
int comedi_data_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t data)
{
comedi_insn insn;
......@@ -42,8 +42,8 @@ int comedi_data_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn);
}
int comedi_data_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t * data)
int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t *data)
{
comedi_insn insn;
......@@ -57,7 +57,7 @@ int comedi_data_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn);
}
int comedi_data_read_hint(comedi_t * dev, unsigned int subdev,
int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
unsigned int chan, unsigned int range, unsigned int aref)
{
comedi_insn insn;
......@@ -73,9 +73,9 @@ int comedi_data_read_hint(comedi_t * dev, unsigned int subdev,
return comedi_do_insn(dev, &insn);
}
int comedi_data_read_delayed(comedi_t * dev, unsigned int subdev,
int comedi_data_read_delayed(comedi_t *dev, unsigned int subdev,
unsigned int chan, unsigned int range, unsigned int aref,
lsampl_t * data, unsigned int nano_sec)
lsampl_t *data, unsigned int nano_sec)
{
int retval;
......
......@@ -26,7 +26,7 @@
#include <linux/string.h>
int comedi_dio_config(comedi_t * dev, unsigned int subdev, unsigned int chan,
int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int io)
{
comedi_insn insn;
......@@ -41,7 +41,7 @@ int comedi_dio_config(comedi_t * dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn);
}
int comedi_dio_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int *val)
{
comedi_insn insn;
......@@ -56,7 +56,7 @@ int comedi_dio_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn);
}
int comedi_dio_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int val)
{
comedi_insn insn;
......@@ -71,7 +71,7 @@ int comedi_dio_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
return comedi_do_insn(dev, &insn);
}
int comedi_dio_bitfield(comedi_t * dev, unsigned int subdev, unsigned int mask,
int comedi_dio_bitfield(comedi_t *dev, unsigned int subdev, unsigned int mask,
unsigned int *bits)
{
comedi_insn insn;
......
......@@ -26,14 +26,14 @@
#include "../comedilib.h"
#include "../comedidev.h"
int comedi_get_n_subdevices(comedi_t * d)
int comedi_get_n_subdevices(comedi_t *d)
{
comedi_device *dev = (comedi_device *) d;
return dev->n_subdevices;
}
int comedi_get_version_code(comedi_t * d)
int comedi_get_version_code(comedi_t *d)
{
return COMEDI_VERSION_CODE;
}
......@@ -52,7 +52,7 @@ const char *comedi_get_board_name(comedi_t * d)
return dev->board_name;
}
int comedi_get_subdevice_type(comedi_t * d, unsigned int subdevice)
int comedi_get_subdevice_type(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -60,7 +60,7 @@ int comedi_get_subdevice_type(comedi_t * d, unsigned int subdevice)
return s->type;
}
unsigned int comedi_get_subdevice_flags(comedi_t * d, unsigned int subdevice)
unsigned int comedi_get_subdevice_flags(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -68,7 +68,7 @@ unsigned int comedi_get_subdevice_flags(comedi_t * d, unsigned int subdevice)
return s->subdev_flags;
}
int comedi_find_subdevice_by_type(comedi_t * d, int type, unsigned int subd)
int comedi_find_subdevice_by_type(comedi_t *d, int type, unsigned int subd)
{
comedi_device *dev = (comedi_device *) d;
......@@ -82,7 +82,7 @@ int comedi_find_subdevice_by_type(comedi_t * d, int type, unsigned int subd)
return -1;
}
int comedi_get_n_channels(comedi_t * d, unsigned int subdevice)
int comedi_get_n_channels(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -90,7 +90,7 @@ int comedi_get_n_channels(comedi_t * d, unsigned int subdevice)
return s->n_chan;
}
int comedi_get_len_chanlist(comedi_t * d, unsigned int subdevice)
int comedi_get_len_chanlist(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -98,7 +98,7 @@ int comedi_get_len_chanlist(comedi_t * d, unsigned int subdevice)
return s->len_chanlist;
}
lsampl_t comedi_get_maxdata(comedi_t * d, unsigned int subdevice,
lsampl_t comedi_get_maxdata(comedi_t *d, unsigned int subdevice,
unsigned int chan)
{
comedi_device *dev = (comedi_device *) d;
......@@ -111,7 +111,7 @@ lsampl_t comedi_get_maxdata(comedi_t * d, unsigned int subdevice,
}
#ifdef KCOMEDILIB_DEPRECATED
int comedi_get_rangetype(comedi_t * d, unsigned int subdevice,
int comedi_get_rangetype(comedi_t *d, unsigned int subdevice,
unsigned int chan)
{
comedi_device *dev = (comedi_device *) d;
......@@ -130,7 +130,7 @@ int comedi_get_rangetype(comedi_t * d, unsigned int subdevice,
}
#endif
int comedi_get_n_ranges(comedi_t * d, unsigned int subdevice, unsigned int chan)
int comedi_get_n_ranges(comedi_t *d, unsigned int subdevice, unsigned int chan)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -148,8 +148,8 @@ int comedi_get_n_ranges(comedi_t * d, unsigned int subdevice, unsigned int chan)
/*
* ALPHA (non-portable)
*/
int comedi_get_krange(comedi_t * d, unsigned int subdevice, unsigned int chan,
unsigned int range, comedi_krange * krange)
int comedi_get_krange(comedi_t *d, unsigned int subdevice, unsigned int chan,
unsigned int range, comedi_krange *krange)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -171,7 +171,7 @@ int comedi_get_krange(comedi_t * d, unsigned int subdevice, unsigned int chan,
/*
* ALPHA (may be renamed)
*/
unsigned int comedi_get_buf_head_pos(comedi_t * d, unsigned int subdevice)
unsigned int comedi_get_buf_head_pos(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -184,7 +184,7 @@ unsigned int comedi_get_buf_head_pos(comedi_t * d, unsigned int subdevice)
return async->buf_write_count;
}
int comedi_get_buffer_contents(comedi_t * d, unsigned int subdevice)
int comedi_get_buffer_contents(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......@@ -203,7 +203,7 @@ int comedi_get_buffer_contents(comedi_t * d, unsigned int subdevice)
/*
* ALPHA
*/
int comedi_set_user_int_count(comedi_t * d, unsigned int subdevice,
int comedi_set_user_int_count(comedi_t *d, unsigned int subdevice,
unsigned int buf_user_count)
{
comedi_device *dev = (comedi_device *) d;
......@@ -224,7 +224,7 @@ int comedi_set_user_int_count(comedi_t * d, unsigned int subdevice,
return 0;
}
int comedi_mark_buffer_read(comedi_t * d, unsigned int subdevice,
int comedi_mark_buffer_read(comedi_t *d, unsigned int subdevice,
unsigned int num_bytes)
{
comedi_device *dev = (comedi_device *) d;
......@@ -243,7 +243,7 @@ int comedi_mark_buffer_read(comedi_t * d, unsigned int subdevice,
return 0;
}
int comedi_mark_buffer_written(comedi_t * d, unsigned int subdevice,
int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
unsigned int num_bytes)
{
comedi_device *dev = (comedi_device *) d;
......@@ -263,7 +263,7 @@ int comedi_mark_buffer_written(comedi_t * d, unsigned int subdevice,
return 0;
}
int comedi_get_buffer_size(comedi_t * d, unsigned int subdev)
int comedi_get_buffer_size(comedi_t *d, unsigned int subdev)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdev;
......@@ -278,7 +278,7 @@ int comedi_get_buffer_size(comedi_t * d, unsigned int subdev)
return async->prealloc_bufsz;
}
int comedi_get_buffer_offset(comedi_t * d, unsigned int subdevice)
int comedi_get_buffer_offset(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
......
......@@ -89,7 +89,7 @@ comedi_t *comedi_open_old(unsigned int minor)
return (comedi_t *) dev;
}
int comedi_close(comedi_t * d)
int comedi_close(comedi_t *d)
{
comedi_device *dev = (comedi_device *) d;
......@@ -113,7 +113,7 @@ char *comedi_strerror(int err)
return "unknown error";
}
int comedi_fileno(comedi_t * d)
int comedi_fileno(comedi_t *d)
{
comedi_device *dev = (comedi_device *) d;
......@@ -121,7 +121,7 @@ int comedi_fileno(comedi_t * d)
return dev->minor;
}
int comedi_command(comedi_t * d, comedi_cmd * cmd)
int comedi_command(comedi_t *d, comedi_cmd *cmd)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -161,7 +161,7 @@ int comedi_command(comedi_t * d, comedi_cmd * cmd)
return s->do_cmd(dev, s);
}
int comedi_command_test(comedi_t * d, comedi_cmd * cmd)
int comedi_command_test(comedi_t *d, comedi_cmd *cmd)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -183,7 +183,7 @@ int comedi_command_test(comedi_t * d, comedi_cmd * cmd)
* COMEDI_INSN
* perform an instruction
*/
int comedi_do_insn(comedi_t * d, comedi_insn * insn)
int comedi_do_insn(comedi_t *d, comedi_insn *insn)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -323,7 +323,7 @@ int comedi_do_insn(comedi_t * d, comedi_insn * insn)
- lock while subdevice being programmed
*/
int comedi_lock(comedi_t * d, unsigned int subdevice)
int comedi_lock(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -366,7 +366,7 @@ int comedi_lock(comedi_t * d, unsigned int subdevice)
none
*/
int comedi_unlock(comedi_t * d, unsigned int subdevice)
int comedi_unlock(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -418,7 +418,7 @@ int comedi_unlock(comedi_t * d, unsigned int subdevice)
nothing
*/
int comedi_cancel(comedi_t * d, unsigned int subdevice)
int comedi_cancel(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -461,7 +461,7 @@ int comedi_cancel(comedi_t * d, unsigned int subdevice)
/*
registration of callback functions
*/
int comedi_register_callback(comedi_t * d, unsigned int subdevice,
int comedi_register_callback(comedi_t *d, unsigned int subdevice,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
{
comedi_device *dev = (comedi_device *) d;
......@@ -498,7 +498,7 @@ int comedi_register_callback(comedi_t * d, unsigned int subdevice,
return 0;
}
int comedi_poll(comedi_t * d, unsigned int subdevice)
int comedi_poll(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s = dev->subdevices;
......@@ -525,7 +525,7 @@ int comedi_poll(comedi_t * d, unsigned int subdevice)
}
/* WARNING: not portable */
int comedi_map(comedi_t * d, unsigned int subdevice, void *ptr)
int comedi_map(comedi_t *d, unsigned int subdevice, void *ptr)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......@@ -548,7 +548,7 @@ int comedi_map(comedi_t * d, unsigned int subdevice, void *ptr)
}
/* WARNING: not portable */
int comedi_unmap(comedi_t * d, unsigned int subdevice)
int comedi_unmap(comedi_t *d, unsigned int subdevice)
{
comedi_device *dev = (comedi_device *) d;
comedi_subdevice *s;
......
......@@ -44,7 +44,7 @@ const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} };
writes:
n comedi_krange structures to rangeinfo->range_ptr
*/
int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg)
int do_rangeinfo_ioctl(comedi_device *dev, comedi_rangeinfo *arg)
{
comedi_rangeinfo it;
int subd, chan;
......@@ -84,7 +84,7 @@ int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg)
return 0;
}
static int aref_invalid(comedi_subdevice * s, unsigned int chanspec)
static int aref_invalid(comedi_subdevice *s, unsigned int chanspec)
{
unsigned int aref;
......@@ -120,7 +120,7 @@ static int aref_invalid(comedi_subdevice * s, unsigned int chanspec)
This function checks each element in a channel/gain list to make
make sure it is valid.
*/
int check_chanlist(comedi_subdevice * s, int n, unsigned int *chanlist)
int check_chanlist(comedi_subdevice *s, int n, unsigned int *chanlist)
{
int i;
int chan;
......
......@@ -67,7 +67,7 @@ static struct comedi_irq_struct *comedi_irqs[NR_IRQS];
int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
void *PT_REGS_ARG), unsigned long flags, const char *device,
comedi_device * dev_id)
comedi_device *dev_id)
{
struct comedi_irq_struct *it;
int ret;
......@@ -102,7 +102,7 @@ int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
return 0;
}
void comedi_free_irq(unsigned int irq, comedi_device * dev_id)
void comedi_free_irq(unsigned int irq, comedi_device *dev_id)
{
struct comedi_irq_struct *it;
......@@ -121,7 +121,7 @@ void comedi_free_irq(unsigned int irq, comedi_device * dev_id)
comedi_irqs[irq] = NULL;
}
int comedi_switch_to_rt(comedi_device * dev)
int comedi_switch_to_rt(comedi_device *dev)
{
struct comedi_irq_struct *it;
unsigned long flags;
......@@ -145,7 +145,7 @@ int comedi_switch_to_rt(comedi_device * dev)
return 0;
}
void comedi_switch_to_non_rt(comedi_device * dev)
void comedi_switch_to_non_rt(comedi_device *dev)
{
struct comedi_irq_struct *it;
unsigned long flags;
......@@ -170,7 +170,7 @@ void wake_up_int_handler(int arg1, void *arg2)
wake_up_interruptible((wait_queue_head_t *) arg2);
}
void comedi_rt_pend_wakeup(wait_queue_head_t * q)
void comedi_rt_pend_wakeup(wait_queue_head_t *q)
{
rt_pend_call(wake_up_int_handler, 0, q);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment