提交 862755ec 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 472cd3db
......@@ -33,7 +33,6 @@ Configuration Options:
#include <linux/module.h>
#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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -120,7 +120,6 @@ Passing a zero for an option is the same as leaving it unspecified.
/*
* 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 @@ Passing a zero for an option is the same as leaving it unspecified.
/*
* 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. */
......
......@@ -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 */
......
......@@ -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
......
......@@ -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
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -56,8 +56,6 @@ Configuration options:
#include <linux/delay.h>
#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;
......
......@@ -36,8 +36,6 @@ Configuration options:
#include <linux/module.h>
#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;
......
......@@ -56,9 +56,6 @@ Configuration Options:
#include <linux/delay.h>
/* 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;
......
......@@ -28,8 +28,6 @@ Devices: [Quanser Consulting] MultiQ-3 (multiq3)
#include <linux/interrupt.h>
#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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -40,13 +40,10 @@ comedi_config /dev/comedi0 s526 0x2C0,0x3
#include "../comedidev.h"
#include <asm/byteorder.h>
#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;
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册