diff options
author | H Hartley Sweeten | 2012-08-14 22:45:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2012-08-15 01:46:34 +0200 |
commit | 69af59970bec925d182ca5ebd80e643fdd90b1cc (patch) | |
tree | 57a0c87342094f26dee353ba159e0352e08cbcc7 | |
parent | staging: line6: variax.c: Eliminated remaining strict_stroul()s (diff) | |
download | kernel-qcow2-linux-69af59970bec925d182ca5ebd80e643fdd90b1cc.tar.gz kernel-qcow2-linux-69af59970bec925d182ca5ebd80e643fdd90b1cc.tar.xz kernel-qcow2-linux-69af59970bec925d182ca5ebd80e643fdd90b1cc.zip |
staging: comedi: adl_pci7x3x: fix pointer-to-int-cast warning
This driver uses the void *private variable in the comedi_subdevice
to pass the offset needed to read/write the appropriate register to
get/set the channels for the subdevice.
The adl_pci7x3x_do_insn_bits() and adl_pci7x3x_di_insn_bits() functions
were retrieving this offset by casting the s->private value as an
unsigned int. On 64-bit builds this results in a warning:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Fix these warnings by casting the void * to an unsigned long.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/adl_pci7x3x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c index 990670a3c5b1..41963fba4fc2 100644 --- a/drivers/staging/comedi/drivers/adl_pci7x3x.c +++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c @@ -121,7 +121,7 @@ static int adl_pci7x3x_do_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - unsigned int reg = (unsigned int)s->private; + unsigned long reg = (unsigned long)s->private; unsigned int mask = data[0]; unsigned int bits = data[1]; @@ -147,7 +147,7 @@ static int adl_pci7x3x_di_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - unsigned int reg = (unsigned int)s->private; + unsigned long reg = (unsigned long)s->private; data[1] = inl(dev->iobase + reg); |