Pārlūkot izejas kodu

Staging: comedi: Remove typedefs

Remove all remaining typedefs from comedi drivers

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arun Thomas 15 gadi atpakaļ
vecāks
revīzija
56b8421cee

+ 0 - 1
drivers/staging/comedi/TODO

@@ -2,7 +2,6 @@ TODO:
 	- checkpatch.pl cleanups
 	- checkpatch.pl cleanups
 	- Lindent
 	- Lindent
 	- remove all wrappers
 	- remove all wrappers
-	- remove typedefs
 	- audit userspace interface
 	- audit userspace interface
 	- reserve major number
 	- reserve major number
 	- cleanup the individual comedi drivers as well
 	- cleanup the individual comedi drivers as well

+ 5 - 5
drivers/staging/comedi/drivers/addi-data/addi_eeprom.c

@@ -101,10 +101,10 @@ struct str_TimerMainHeader {
 };
 };
 
 
 
 
-typedef struct {
+struct str_AnalogOutputHeader {
 	unsigned short w_Nchannel;
 	unsigned short w_Nchannel;
 	unsigned char b_Resolution;
 	unsigned char b_Resolution;
-} str_AnalogOutputHeader;
+};
 
 
 struct str_AnalogInputHeader {
 struct str_AnalogInputHeader {
 	unsigned short w_Nchannel;
 	unsigned short w_Nchannel;
@@ -136,7 +136,7 @@ int i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress,
 
 
 int i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
 int i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
 	char *pc_PCIChipInformation, unsigned short w_Address,
 	char *pc_PCIChipInformation, unsigned short w_Address,
-	str_AnalogOutputHeader *s_Header);
+	struct str_AnalogOutputHeader *s_Header);
 
 
 int i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress,
 int i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress,
 	char *pc_PCIChipInformation, unsigned short w_Address,
 	char *pc_PCIChipInformation, unsigned short w_Address,
@@ -811,7 +811,7 @@ int i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress,
 	struct str_DigitalInputHeader s_DigitalInputHeader;
 	struct str_DigitalInputHeader s_DigitalInputHeader;
 	struct str_DigitalOutputHeader s_DigitalOutputHeader;
 	struct str_DigitalOutputHeader s_DigitalOutputHeader;
 	/* struct str_TimerMainHeader     s_TimerMainHeader,s_WatchdogMainHeader; */
 	/* struct str_TimerMainHeader     s_TimerMainHeader,s_WatchdogMainHeader; */
-	str_AnalogOutputHeader s_AnalogOutputHeader;
+	struct str_AnalogOutputHeader s_AnalogOutputHeader;
 	struct str_AnalogInputHeader s_AnalogInputHeader;
 	struct str_AnalogInputHeader s_AnalogInputHeader;
 
 
 	/* Read size */
 	/* Read size */
@@ -1081,7 +1081,7 @@ int i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress,
 
 
 int i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
 int i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
 	char *pc_PCIChipInformation, unsigned short w_Address,
 	char *pc_PCIChipInformation, unsigned short w_Address,
-	str_AnalogOutputHeader *s_Header)
+	struct str_AnalogOutputHeader *s_Header)
 {
 {
 	unsigned short w_Temp;
 	unsigned short w_Temp;
 	/*  No of channels for 1st hard component */
 	/*  No of channels for 1st hard component */

+ 2 - 5
drivers/staging/comedi/drivers/jr3_pci.c

@@ -123,12 +123,9 @@ struct jr3_pci_subdev_private {
 };
 };
 
 
 /* Hotplug firmware loading stuff */
 /* Hotplug firmware loading stuff */
-
-typedef int comedi_firmware_callback(struct comedi_device *dev,
-				     const u8 * data, size_t size);
-
 static int comedi_load_firmware(struct comedi_device *dev, char *name,
 static int comedi_load_firmware(struct comedi_device *dev, char *name,
-				comedi_firmware_callback cb)
+				int (*cb)(struct comedi_device *dev,
+					const u8 *data, size_t size))
 {
 {
 	int result = 0;
 	int result = 0;
 	const struct firmware *fw;
 	const struct firmware *fw;

+ 12 - 5
drivers/staging/comedi/drivers/pcmmio.c

@@ -145,10 +145,6 @@ Configuration Options:
 #define PAGE_ENAB 2
 #define PAGE_ENAB 2
 #define PAGE_INT_ID 3
 #define PAGE_INT_ID 3
 
 
-typedef int (*comedi_insn_fn_t) (struct comedi_device *,
-				 struct comedi_subdevice *,
-				 struct comedi_insn *, unsigned int *);
-
 static int ai_rinsn(struct comedi_device *, struct comedi_subdevice *,
 static int ai_rinsn(struct comedi_device *, struct comedi_subdevice *,
 		    struct comedi_insn *, unsigned int *);
 		    struct comedi_insn *, unsigned int *);
 static int ao_rinsn(struct comedi_device *, struct comedi_subdevice *,
 static int ao_rinsn(struct comedi_device *, struct comedi_subdevice *,
@@ -171,7 +167,18 @@ struct pcmmio_board {
 	const int n_ai_chans;
 	const int n_ai_chans;
 	const int n_ao_chans;
 	const int n_ao_chans;
 	const struct comedi_lrange *ai_range_table, *ao_range_table;
 	const struct comedi_lrange *ai_range_table, *ao_range_table;
-	comedi_insn_fn_t ai_rinsn, ao_rinsn, ao_winsn;
+	int (*ai_rinsn) (struct comedi_device *dev,
+			struct comedi_subdevice *s,
+			struct comedi_insn *insn,
+			unsigned int *data);
+	int (*ao_rinsn) (struct comedi_device *dev,
+			struct comedi_subdevice *s,
+			struct comedi_insn *insn,
+			unsigned int *data);
+	int (*ao_winsn) (struct comedi_device *dev,
+			struct comedi_subdevice *s,
+			struct comedi_insn *insn,
+			unsigned int *data);
 };
 };
 
 
 static const struct comedi_lrange ranges_ai = {
 static const struct comedi_lrange ranges_ai = {

+ 0 - 9
drivers/staging/comedi/drivers/s626.h

@@ -720,15 +720,6 @@
 #define STDMSK_CLKMULT		((uint16_t)(3 << STDBIT_CLKMULT))
 #define STDMSK_CLKMULT		((uint16_t)(3 << STDBIT_CLKMULT))
 #define STDMSK_CLKENAB		((uint16_t)(1 << STDBIT_CLKENAB))
 #define STDMSK_CLKENAB		((uint16_t)(1 << STDBIT_CLKENAB))
 
 
-/* typedef struct indexCounter */
-/* { */
-/*   unsigned int ao; */
-/*   unsigned int ai; */
-/*   unsigned int digout; */
-/*   unsigned int digin; */
-/*   unsigned int enc; */
-/* }CallCounter; */
-
 struct bufferDMA {
 struct bufferDMA {
 	dma_addr_t PhysicalBase;
 	dma_addr_t PhysicalBase;
 	void *LogicalBase;
 	void *LogicalBase;