changed prototype of comedi_map() to prevent bogus compiler warnings
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 27 Oct 2002 03:30:17 +0000 (03:30 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 27 Oct 2002 03:30:17 +0000 (03:30 +0000)
comedi/kcomedilib/kcomedilib_main.c
include/linux/comedilib.h

index 0a4fee692b3655239b00ef91c58007dd298e35b4..087207e4dc0ee7e3530aa99645a0984e7d6497df 100644 (file)
@@ -475,7 +475,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 = dev->subdevices + subdevice;
@@ -483,7 +483,10 @@ int comedi_map(comedi_t *d, unsigned int subdevice, void **ptr)
        if(!s->async)
                return -EINVAL;
 
-       if(ptr)*ptr=s->async->prealloc_buf;
+       if(ptr)
+       {
+               *((void **) ptr) = s->async->prealloc_buf;
+       }
 
        /* XXX no reference counting */
 
index 24a546584656d81903f031797a556181506b86a8..a4a9ec5e3e4bbb2aa05ec059ba58f6d4bb55e5bf 100644 (file)
@@ -108,7 +108,7 @@ unsigned int comedi_get_buf_head_pos(comedi_t *dev,unsigned int
        subdevice);
 int comedi_set_user_int_count(comedi_t *dev,unsigned int subdevice,
        unsigned int buf_user_count);
-int comedi_map(comedi_t *dev, unsigned int subdev, void **ptr);
+int comedi_map(comedi_t *dev, unsigned int subdev, void *ptr);
 int comedi_unmap(comedi_t *dev, unsigned int subdev);