[PATCH] Staging: comedi: Fix build problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[...]
 CC [M]  drivers/staging/comedi/comedi_compat32.o
 drivers/staging/comedi/comedi_compat32.c: In function ‘compat_chaninfo’:
 drivers/staging/comedi/comedi_compat32.c:135: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:139: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: warning: type defaults to ‘int’ in declaration of ‘type name’
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: warning: type defaults to ‘int’ in declaration of ‘type name’
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: warning: type defaults to ‘int’ in declaration of ‘type name’
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 drivers/staging/comedi/comedi_compat32.c:145: error: dereferencing pointer to incomplete type
 [...]

Signed-off-by: Alessio Igor Bogani <abogani@xxxxxxxxxx>
---
 drivers/staging/comedi/comedi.h      |    4 ++--
 drivers/staging/comedi/comedi_fops.c |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index e6b5f16..405b191 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -294,7 +294,7 @@ enum comedi_support_level {
 #define COMEDI_DEVCONFIG _IOW(CIO, 0, struct comedi_devconfig)
 #define COMEDI_DEVINFO _IOR(CIO, 1, struct comedi_devinfo)
 #define COMEDI_SUBDINFO _IOR(CIO, 2, struct comedi_subdinfo)
-#define COMEDI_CHANINFO _IOR(CIO, 3, struct comedi_chaninfo)
+#define COMEDI_CHANINFO _IOR(CIO, 3, struct comedi_chaninfo_struct)
 #define COMEDI_TRIG _IOWR(CIO, 4, comedi_trig)
 #define COMEDI_LOCK _IO(CIO, 5)
 #define COMEDI_UNLOCK _IO(CIO, 6)
@@ -365,7 +365,7 @@ struct comedi_cmd {
 	unsigned int data_len;
 };
 
-struct comedi_chaninfo {
+struct comedi_chaninfo_struct {
 	unsigned int subdev;
 	unsigned int *maxdata_list;
 	unsigned int *flaglist;
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 19dce2e..c356f19 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -75,7 +75,7 @@ static int do_devinfo_ioctl(struct comedi_device *dev, struct comedi_devinfo *ar
 			    struct file *file);
 static int do_subdinfo_ioctl(struct comedi_device *dev, struct comedi_subdinfo *arg,
 			     void *file);
-static int do_chaninfo_ioctl(struct comedi_device *dev, struct comedi_chaninfo *arg);
+static int do_chaninfo_ioctl(struct comedi_device *dev, struct comedi_chaninfo_struct *arg);
 static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg);
 static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file);
 static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
@@ -490,12 +490,12 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, struct comedi_subdinfo *
 		arrays at elements of chaninfo structure
 
 */
-static int do_chaninfo_ioctl(struct comedi_device *dev, struct comedi_chaninfo *arg)
+static int do_chaninfo_ioctl(struct comedi_device *dev, struct comedi_chaninfo_struct *arg)
 {
 	struct comedi_subdevice *s;
-	struct comedi_chaninfo it;
+	struct comedi_chaninfo_struct it;
 
-	if (copy_from_user(&it, arg, sizeof(struct comedi_chaninfo)))
+	if (copy_from_user(&it, arg, sizeof(struct comedi_chaninfo_struct)))
 		return -EFAULT;
 
 	if (it.subdev >= dev->n_subdevices)
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux