From 93d058a34450fdb7ff80ad2242494daa1b6f2c90 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 27 Oct 2002 03:30:17 +0000 Subject: [PATCH] changed prototype of comedi_map() to prevent bogus compiler warnings --- comedi/kcomedilib/kcomedilib_main.c | 7 +++++-- include/linux/comedilib.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index 0a4fee69..087207e4 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -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 */ diff --git a/include/linux/comedilib.h b/include/linux/comedilib.h index 24a54658..a4a9ec5e 100644 --- a/include/linux/comedilib.h +++ b/include/linux/comedilib.h @@ -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); -- 2.26.2