[PATCH v2 09/10] staging: comedi: don't expose comedi_device_{attach, detach}

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

 



These functions are only used by the comedi core. Move the
prototypes to comedi_internal.h so they are not exposed to
the comedi drivers.

Tidy up comedi_internal.h a bit so that all the internal stuff
in drivers.c is grouped.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/comedi_internal.h | 11 +++++++++--
 drivers/staging/comedi/comedidev.h       |  3 ---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/comedi_internal.h b/drivers/staging/comedi/comedi_internal.h
index 5e6f05b..81b6f78 100644
--- a/drivers/staging/comedi/comedi_internal.h
+++ b/drivers/staging/comedi/comedi_internal.h
@@ -8,8 +8,6 @@
  */
 int do_rangeinfo_ioctl(struct comedi_device *dev,
 		       struct comedi_rangeinfo __user *arg);
-int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
-	       struct comedi_insn *insn, unsigned int *data);
 int comedi_alloc_board_minor(struct device *hardware_device);
 void comedi_free_board_minor(unsigned minor);
 int comedi_find_board_minor(struct device *hardware_device);
@@ -22,6 +20,15 @@ unsigned int comedi_buf_write_n_allocated(struct comedi_async *async);
 extern unsigned int comedi_default_buf_size_kb;
 extern unsigned int comedi_default_buf_maxsize_kb;
 extern bool comedi_autoconfig;
+
+/* drivers.c */
+
 extern struct comedi_driver *comedi_drivers;
 
+int insn_inval(struct comedi_device *, struct comedi_subdevice *,
+	       struct comedi_insn *, unsigned int *);
+
+void comedi_device_detach(struct comedi_device *);
+int comedi_device_attach(struct comedi_device *, struct comedi_devconfig *);
+
 #endif /* _COMEDI_INTERNAL_H */
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 0f29dd5..afaf2ae 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -369,9 +369,6 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s);
 
 int comedi_alloc_subdevices(struct comedi_device *, int);
 
-void comedi_device_detach(struct comedi_device *);
-int comedi_device_attach(struct comedi_device *, struct comedi_devconfig *);
-
 int comedi_auto_config(struct device *, struct comedi_driver *,
 		       unsigned long context);
 void comedi_auto_unconfig(struct device *);
-- 
1.8.1.1.293.gfe73786

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux