Commit 5994e51b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_tio: tidy up struct ni_gpct_device (*{write, read}_register)

For aesthetics, rename these callbacks to simply read/write. Change the
'unsigned' parameters to 'unsigned int'.

This fixes a number of checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51f2e4eb
...@@ -189,7 +189,7 @@ void ni_tio_write(struct ni_gpct *counter, unsigned int value, ...@@ -189,7 +189,7 @@ void ni_tio_write(struct ni_gpct *counter, unsigned int value,
enum ni_gpct_register reg) enum ni_gpct_register reg)
{ {
if (reg < NITIO_NUM_REGS) if (reg < NITIO_NUM_REGS)
counter->counter_dev->write_register(counter, value, reg); counter->counter_dev->write(counter, value, reg);
} }
EXPORT_SYMBOL_GPL(ni_tio_write); EXPORT_SYMBOL_GPL(ni_tio_write);
...@@ -201,7 +201,7 @@ EXPORT_SYMBOL_GPL(ni_tio_write); ...@@ -201,7 +201,7 @@ EXPORT_SYMBOL_GPL(ni_tio_write);
unsigned int ni_tio_read(struct ni_gpct *counter, enum ni_gpct_register reg) unsigned int ni_tio_read(struct ni_gpct *counter, enum ni_gpct_register reg)
{ {
if (reg < NITIO_NUM_REGS) if (reg < NITIO_NUM_REGS)
return counter->counter_dev->read_register(counter, reg); return counter->counter_dev->read(counter, reg);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(ni_tio_read); EXPORT_SYMBOL_GPL(ni_tio_read);
...@@ -1455,17 +1455,17 @@ EXPORT_SYMBOL_GPL(ni_tio_init_counter); ...@@ -1455,17 +1455,17 @@ EXPORT_SYMBOL_GPL(ni_tio_init_counter);
struct ni_gpct_device * struct ni_gpct_device *
ni_gpct_device_construct(struct comedi_device *dev, ni_gpct_device_construct(struct comedi_device *dev,
void (*write_register)(struct ni_gpct *counter, void (*write)(struct ni_gpct *counter,
unsigned bits, unsigned int value,
enum ni_gpct_register reg), enum ni_gpct_register reg),
unsigned (*read_register)(struct ni_gpct *counter, unsigned int (*read)(struct ni_gpct *counter,
enum ni_gpct_register reg), enum ni_gpct_register reg),
enum ni_gpct_variant variant, enum ni_gpct_variant variant,
unsigned num_counters) unsigned int num_counters)
{ {
struct ni_gpct_device *counter_dev; struct ni_gpct_device *counter_dev;
struct ni_gpct *counter; struct ni_gpct *counter;
unsigned i; unsigned int i;
if (num_counters == 0) if (num_counters == 0)
return NULL; return NULL;
...@@ -1475,8 +1475,8 @@ ni_gpct_device_construct(struct comedi_device *dev, ...@@ -1475,8 +1475,8 @@ ni_gpct_device_construct(struct comedi_device *dev,
return NULL; return NULL;
counter_dev->dev = dev; counter_dev->dev = dev;
counter_dev->write_register = write_register; counter_dev->write = write;
counter_dev->read_register = read_register; counter_dev->read = read;
counter_dev->variant = variant; counter_dev->variant = variant;
spin_lock_init(&counter_dev->regs_lock); spin_lock_init(&counter_dev->regs_lock);
......
...@@ -115,10 +115,9 @@ struct ni_gpct { ...@@ -115,10 +115,9 @@ struct ni_gpct {
struct ni_gpct_device { struct ni_gpct_device {
struct comedi_device *dev; struct comedi_device *dev;
void (*write_register)(struct ni_gpct *counter, unsigned bits, void (*write)(struct ni_gpct *, unsigned int value,
enum ni_gpct_register reg); enum ni_gpct_register);
unsigned (*read_register)(struct ni_gpct *counter, unsigned int (*read)(struct ni_gpct *, enum ni_gpct_register);
enum ni_gpct_register reg);
enum ni_gpct_variant variant; enum ni_gpct_variant variant;
struct ni_gpct *counters; struct ni_gpct *counters;
unsigned num_counters; unsigned num_counters;
...@@ -128,13 +127,13 @@ struct ni_gpct_device { ...@@ -128,13 +127,13 @@ struct ni_gpct_device {
struct ni_gpct_device * struct ni_gpct_device *
ni_gpct_device_construct(struct comedi_device *, ni_gpct_device_construct(struct comedi_device *,
void (*write_register)(struct ni_gpct *, void (*write)(struct ni_gpct *,
unsigned bits, unsigned int value,
enum ni_gpct_register), enum ni_gpct_register),
unsigned (*read_register)(struct ni_gpct *, unsigned int (*read)(struct ni_gpct *,
enum ni_gpct_register), enum ni_gpct_register),
enum ni_gpct_variant, enum ni_gpct_variant,
unsigned num_counters); unsigned int num_counters);
void ni_gpct_device_destroy(struct ni_gpct_device *); void ni_gpct_device_destroy(struct ni_gpct_device *);
void ni_tio_init_counter(struct ni_gpct *); void ni_tio_init_counter(struct ni_gpct *);
int ni_tio_insn_read(struct comedi_device *, struct comedi_subdevice *, int ni_tio_insn_read(struct comedi_device *, struct comedi_subdevice *,
......
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