From 862755ec07572036b0c69d738b88f89b6beede99 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 18 Jul 2014 17:01:22 -0700 Subject: [PATCH] staging: comedi: drivers: remove unnecessary *_SIZE defines Some of the legacy comedi drivers have a *_SIZE define that is only passed to comedi_request_region() to specify the size of the region. Some of the pnp drivers (pci, etc.) also have a *_SIZE define which is unused. For aesthetics, remove these defines. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 3 +-- drivers/staging/comedi/drivers/amplc_pc236.c | 5 +---- drivers/staging/comedi/drivers/amplc_pc263.c | 3 +-- drivers/staging/comedi/drivers/amplc_pci224.c | 2 -- drivers/staging/comedi/drivers/amplc_pci230.c | 3 --- drivers/staging/comedi/drivers/cb_das16_cs.c | 2 -- drivers/staging/comedi/drivers/cb_pcimdas.c | 3 --- drivers/staging/comedi/drivers/das16m1.c | 3 +-- drivers/staging/comedi/drivers/das800.c | 3 +-- drivers/staging/comedi/drivers/dt2811.c | 4 +--- drivers/staging/comedi/drivers/dt2814.c | 4 +--- drivers/staging/comedi/drivers/dt2815.c | 4 +--- drivers/staging/comedi/drivers/dt2817.c | 4 +--- drivers/staging/comedi/drivers/mpc624.c | 5 +---- drivers/staging/comedi/drivers/multiq3.c | 4 +--- drivers/staging/comedi/drivers/ni_at_a2150.c | 3 +-- drivers/staging/comedi/drivers/ni_atmio16d.c | 4 +--- drivers/staging/comedi/drivers/ni_labpc.c | 4 +--- drivers/staging/comedi/drivers/ni_pcidio.c | 3 --- drivers/staging/comedi/drivers/pcm3724.c | 3 +-- drivers/staging/comedi/drivers/s526.c | 5 +---- drivers/staging/comedi/drivers/skel.c | 3 --- 22 files changed, 16 insertions(+), 61 deletions(-) diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c index 781104aa533e..7b5ed439c164 100644 --- a/drivers/staging/comedi/drivers/aio_iiro_16.c +++ b/drivers/staging/comedi/drivers/aio_iiro_16.c @@ -33,7 +33,6 @@ Configuration Options: #include #include "../comedidev.h" -#define AIO_IIRO_16_SIZE 0x08 #define AIO_IIRO_16_RELAY_0_7 0x00 #define AIO_IIRO_16_INPUT_0_7 0x01 #define AIO_IIRO_16_IRQ 0x02 @@ -74,7 +73,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], AIO_IIRO_16_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x8); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c index 2a1006835dec..6089341d2135 100644 --- a/drivers/staging/comedi/drivers/amplc_pc236.c +++ b/drivers/staging/comedi/drivers/amplc_pc236.c @@ -68,9 +68,6 @@ unused. /* PC36AT / PCI236 registers */ -#define PC236_IO_SIZE 4 -#define PC236_LCR_IO_SIZE 128 - /* Disable, and clear, interrupts */ #define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1POL | \ PLX9052_INTCSR_LI2POL | \ @@ -448,7 +445,7 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it) /* Process options according to bus type. */ if (is_isa_board(thisboard)) { - ret = comedi_request_region(dev, it->options[0], PC236_IO_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x4); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c index 7c10d28d2784..c0a20dccd88a 100644 --- a/drivers/staging/comedi/drivers/amplc_pc263.c +++ b/drivers/staging/comedi/drivers/amplc_pc263.c @@ -39,7 +39,6 @@ The state of the outputs can be read. #define PC263_DRIVER_NAME "amplc_pc263" /* PC263 registers */ -#define PC263_IO_SIZE 2 /* * Board descriptions for Amplicon PC263. @@ -75,7 +74,7 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], PC263_IO_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x2); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index 55f69c5981c4..64a961a5643a 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -120,7 +120,6 @@ Caveats: /* * PCI224/234 i/o space 1 (PCIBAR2) registers. */ -#define PCI224_IO1_SIZE 0x20 /* Size of i/o space 1 (8-bit registers) */ #define PCI224_Z2_CT0 0x14 /* 82C54 counter/timer 0 */ #define PCI224_Z2_CT1 0x15 /* 82C54 counter/timer 1 */ #define PCI224_Z2_CT2 0x16 /* 82C54 counter/timer 2 */ @@ -133,7 +132,6 @@ Caveats: /* * PCI224/234 i/o space 2 (PCIBAR3) 16-bit registers. */ -#define PCI224_IO2_SIZE 0x10 /* Size of i/o space 2 (16-bit registers). */ #define PCI224_DACDATA 0x00 /* (w-o) DAC FIFO data. */ #define PCI224_SOFTTRIG 0x00 /* (r-o) DAC software scan trigger. */ #define PCI224_DACCON 0x02 /* (r/w) DAC status/configuration. */ diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index eca16a6b09d7..a61d9904d970 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -200,9 +200,6 @@ for (or detection of) various hardware problems added by Ian Abbott. #define PCI_DEVICE_ID_PCI260 0x0006 #define PCI_DEVICE_ID_INVALID 0xffff -#define PCI230_IO1_SIZE 32 /* Size of I/O space 1 */ -#define PCI230_IO2_SIZE 16 /* Size of I/O space 2 */ - /* PCI230 i/o space 1 registers. */ #define PCI230_PPI_X_BASE 0x00 /* User PPI (82C55) base */ #define PCI230_PPI_X_A 0x00 /* User PPI (82C55) port A */ diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index eb1b92d72e87..853733e28845 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -46,8 +46,6 @@ Status: experimental #include "comedi_fc.h" #include "8253.h" -#define DAS16CS_SIZE 18 - #define DAS16CS_ADC_DATA 0 #define DAS16CS_DIO_MUX 2 #define DAS16CS_MISC1 4 diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index 50e522e6e690..ccb9c72bc0c3 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -47,9 +47,6 @@ See http://www.mccdaq.com/PDFs/Manuals/pcim-das1602-16.pdf for more details. /* Registers for the PCIM-DAS1602/16 */ -/* sizes of io regions (bytes) */ -#define BADR3_SIZE 16 - /* DAC Offsets */ #define ADC_TRIG 0 #define DAC0_OFFSET 2 diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index 2e9cbec404f8..5b6998b54060 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -60,7 +60,6 @@ irq can be omitted, although the cmd interface will not work without it. #include "8253.h" #include "comedi_fc.h" -#define DAS16M1_SIZE 16 #define DAS16M1_SIZE2 8 #define FIFO_SIZE 1024 /* 1024 sample fifo */ @@ -549,7 +548,7 @@ static int das16m1_attach(struct comedi_device *dev, if (!devpriv) return -ENOMEM; - ret = comedi_request_region(dev, it->options[0], DAS16M1_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x10); if (ret) return ret; /* Request an additional region for the 8255 */ diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 6f7f8d531dd5..cbbb29797b83 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -65,7 +65,6 @@ cmd triggers supported: #include "8253.h" #include "comedi_fc.h" -#define DAS800_SIZE 8 #define N_CHAN_AI 8 /* number of analog input channels */ /* Registers for the das800 */ @@ -686,7 +685,7 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv) return -ENOMEM; - ret = comedi_request_region(dev, it->options[0], DAS800_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x8); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt2811.c index ba7c2ba618e6..a2e9caf3256f 100644 --- a/drivers/staging/comedi/drivers/dt2811.c +++ b/drivers/staging/comedi/drivers/dt2811.c @@ -169,8 +169,6 @@ static const struct comedi_lrange range_dt2811_pgl_ai_5_bipolar = { #define TIMEOUT 10000 -#define DT2811_SIZE 8 - #define DT2811_ADCSR 0 #define DT2811_ADGCR 1 #define DT2811_ADDATLO 2 @@ -344,7 +342,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it) int ret; struct comedi_subdevice *s; - ret = comedi_request_region(dev, it->options[0], DT2811_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x8); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c index 4c4b1f9c86a6..9216c35c414e 100644 --- a/drivers/staging/comedi/drivers/dt2814.c +++ b/drivers/staging/comedi/drivers/dt2814.c @@ -42,8 +42,6 @@ addition, the clock does not seem to be very accurate. #include "comedi_fc.h" -#define DT2814_SIZE 2 - #define DT2814_CSR 0 #define DT2814_DATA 1 @@ -243,7 +241,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) int ret; int i; - ret = comedi_request_region(dev, it->options[0], DT2814_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x2); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c index 1f321db740a4..a98fb66fdd53 100644 --- a/drivers/staging/comedi/drivers/dt2815.c +++ b/drivers/staging/comedi/drivers/dt2815.c @@ -56,8 +56,6 @@ Configuration options: #include -#define DT2815_SIZE 2 - #define DT2815_DATA 0 #define DT2815_STATUS 1 @@ -154,7 +152,7 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) const struct comedi_lrange *current_range_type, *voltage_range_type; int ret; - ret = comedi_request_region(dev, it->options[0], DT2815_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x2); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/dt2817.c b/drivers/staging/comedi/drivers/dt2817.c index bf589936e546..5131deebf66f 100644 --- a/drivers/staging/comedi/drivers/dt2817.c +++ b/drivers/staging/comedi/drivers/dt2817.c @@ -36,8 +36,6 @@ Configuration options: #include #include "../comedidev.h" -#define DT2817_SIZE 5 - #define DT2817_CR 0 #define DT2817_DATA 1 @@ -114,7 +112,7 @@ static int dt2817_attach(struct comedi_device *dev, struct comedi_devconfig *it) int ret; struct comedi_subdevice *s; - ret = comedi_request_region(dev, it->options[0], DT2817_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x5); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index f770400a0e81..1241f9987cab 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c @@ -56,9 +56,6 @@ Configuration Options: #include -/* Consecutive I/O port addresses */ -#define MPC624_SIZE 16 - /* Offsets of different ports */ #define MPC624_MASTER_CONTROL 0 /* not used */ #define MPC624_GNMUXCH 1 /* Gain, Mux, Channel of ADC */ @@ -279,7 +276,7 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], MPC624_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x10); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/multiq3.c b/drivers/staging/comedi/drivers/multiq3.c index 60bda9c47cf1..e841a5a3ec4f 100644 --- a/drivers/staging/comedi/drivers/multiq3.c +++ b/drivers/staging/comedi/drivers/multiq3.c @@ -28,8 +28,6 @@ Devices: [Quanser Consulting] MultiQ-3 (multiq3) #include #include "../comedidev.h" -#define MULTIQ3_SIZE 16 - /* * MULTIQ-3 port offsets */ @@ -233,7 +231,7 @@ static int multiq3_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], MULTIQ3_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x10); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index 76fed317403e..de67161f6185 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -71,7 +71,6 @@ TRIG_WAKE_EOS #include "8253.h" #include "comedi_fc.h" -#define A2150_SIZE 28 #define A2150_DMA_BUFFER_SIZE 0xff00 /* size in bytes of dma buffer */ /* Registers and bits */ @@ -702,7 +701,7 @@ static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv) return -ENOMEM; - ret = comedi_request_region(dev, it->options[0], A2150_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x1c); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index b1b4744bc42e..9c08da9508f4 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -94,8 +94,6 @@ Devices: [National Instruments] AT-MIO-16 (atmio16), AT-MIO-16D (atmio16d) #define CLOCK_10_KHZ 0x8D25 #define CLOCK_1_KHZ 0x8E25 #define CLOCK_100_HZ 0x8F25 -/* Other miscellaneous defines */ -#define ATMIO16D_SIZE 32 /* bus address range */ struct atmio16_board_t { @@ -624,7 +622,7 @@ static int atmio16d_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], ATMIO16D_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x20); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 8b41813ebf65..51a6d4e78c04 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -72,8 +72,6 @@ #include "ni_labpc_regs.h" #include "ni_labpc_isadma.h" -#define LABPC_SIZE 0x20 /* size of ISA io region */ - enum scan_mode { MODE_SINGLE_CHAN, MODE_SINGLE_CHAN_INTERVAL, @@ -1465,7 +1463,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (!devpriv) return -ENOMEM; - ret = comedi_request_region(dev, it->options[0], LABPC_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x20); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 0a24b216c226..2bf86911cb6b 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -58,9 +58,6 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org #include "comedi_fc.h" #include "mite.h" -#define PCI_DIO_SIZE 4096 -#define PCI_MITE_SIZE 4096 - /* defines for the PCI-DIO-32HS */ #define Window_Address 4 /* W */ diff --git a/drivers/staging/comedi/drivers/pcm3724.c b/drivers/staging/comedi/drivers/pcm3724.c index e88a5edce051..6e0d78f6095b 100644 --- a/drivers/staging/comedi/drivers/pcm3724.c +++ b/drivers/staging/comedi/drivers/pcm3724.c @@ -33,7 +33,6 @@ Copy/pasted/hacked from pcm724.c #include "8255.h" -#define PCM3724_SIZE 16 #define SIZE_8255 4 #define BUF_C0 0x1 @@ -202,7 +201,7 @@ static int pcm3724_attach(struct comedi_device *dev, if (!priv) return -ENOMEM; - ret = comedi_request_region(dev, it->options[0], PCM3724_SIZE); + ret = comedi_request_region(dev, it->options[0], 0x10); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 208567d2cb21..83f7433c2452 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -40,13 +40,10 @@ comedi_config /dev/comedi0 s526 0x2C0,0x3 #include "../comedidev.h" #include -#define S526_SIZE 64 - #define S526_START_AI_CONV 0 #define S526_AI_READ 0 /* Ports */ -#define S526_IOSIZE 0x40 #define S526_NUM_PORTS 27 /* registers */ @@ -556,7 +553,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; int ret; - ret = comedi_request_region(dev, it->options[0], S526_IOSIZE); + ret = comedi_request_region(dev, it->options[0], 0x40); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c index 7661f2b0a183..a118678c24a1 100644 --- a/drivers/staging/comedi/drivers/skel.c +++ b/drivers/staging/comedi/drivers/skel.c @@ -75,9 +75,6 @@ Configuration Options: #include "comedi_fc.h" /* Imaginary registers for the imaginary board */ - -#define SKEL_SIZE 0 - #define SKEL_START_AI_CONV 0 #define SKEL_AI_READ 0 -- 2.39.5