From 1a8da31b6cbca7cd0a6b6ca738fa420eb2ee899a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 2 May 2016 10:11:34 -0700 Subject: staging: comedi: mite: rename 'struct mite_struct' Rename this struct to simply 'mite'. The current name is a bit redundant. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.c | 33 +++++++++++++++--------------- drivers/staging/comedi/drivers/mite.h | 18 ++++++++-------- drivers/staging/comedi/drivers/ni_660x.c | 2 +- drivers/staging/comedi/drivers/ni_pcidio.c | 2 +- drivers/staging/comedi/drivers/ni_stc.h | 2 +- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c index 1f54cd01e219..4bfdbf03eece 100644 --- a/drivers/staging/comedi/drivers/mite.c +++ b/drivers/staging/comedi/drivers/mite.c @@ -219,9 +219,9 @@ static void mite_dma_reset(struct mite_channel *mite_chan) mite_chan->mite->mite_io_addr + MITE_CHOR(mite_chan->channel)); } -struct mite_struct *mite_alloc(struct pci_dev *pcidev) +struct mite *mite_alloc(struct pci_dev *pcidev) { - struct mite_struct *mite; + struct mite *mite; unsigned int i; mite = kzalloc(sizeof(*mite), GFP_KERNEL); @@ -255,8 +255,7 @@ static void dump_chip_signature(u32 csigr_bits) CSIGR_TO_WINS(csigr_bits), CSIGR_TO_IOWINS(csigr_bits)); } -static unsigned int mite_fifo_size(struct mite_struct *mite, - unsigned int channel) +static unsigned int mite_fifo_size(struct mite *mite, unsigned int channel) { unsigned int fcr_bits = readl(mite->mite_io_addr + MITE_FCR(channel)); unsigned int empty_count = (fcr_bits >> 16) & 0xff; @@ -266,7 +265,7 @@ static unsigned int mite_fifo_size(struct mite_struct *mite, } int mite_setup2(struct comedi_device *dev, - struct mite_struct *mite, bool use_win1) + struct mite *mite, bool use_win1) { resource_size_t daq_phys_addr; unsigned long length; @@ -344,7 +343,7 @@ int mite_setup2(struct comedi_device *dev, } EXPORT_SYMBOL_GPL(mite_setup2); -void mite_detach(struct mite_struct *mite) +void mite_detach(struct mite *mite) { if (!mite) return; @@ -356,7 +355,7 @@ void mite_detach(struct mite_struct *mite) } EXPORT_SYMBOL_GPL(mite_detach); -struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite) +struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite *mite) { struct mite_dma_descriptor_ring *ring = kmalloc(sizeof(struct mite_dma_descriptor_ring), GFP_KERNEL); @@ -392,7 +391,7 @@ void mite_free_ring(struct mite_dma_descriptor_ring *ring) EXPORT_SYMBOL_GPL(mite_free_ring); struct mite_channel * -mite_request_channel_in_range(struct mite_struct *mite, +mite_request_channel_in_range(struct mite *mite, struct mite_dma_descriptor_ring *ring, unsigned int min_channel, unsigned int max_channel) @@ -421,7 +420,7 @@ EXPORT_SYMBOL_GPL(mite_request_channel_in_range); void mite_release_channel(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; unsigned long flags; /* spin lock to prevent races with mite_request_channel */ @@ -448,7 +447,7 @@ EXPORT_SYMBOL_GPL(mite_release_channel); void mite_dma_arm(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; int chor; unsigned long flags; @@ -566,8 +565,8 @@ EXPORT_SYMBOL_GPL(mite_init_ring_descriptors); void mite_prep_dma(struct mite_channel *mite_chan, unsigned int num_device_bits, unsigned int num_memory_bits) { + struct mite *mite = mite_chan->mite; unsigned int chcr, mcr, dcr, lkcr; - struct mite_struct *mite = mite_chan->mite; mite_dma_reset(mite_chan); @@ -650,14 +649,14 @@ EXPORT_SYMBOL_GPL(mite_prep_dma); static u32 mite_device_bytes_transferred(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; return readl(mite->mite_io_addr + MITE_DAR(mite_chan->channel)); } u32 mite_bytes_in_transit(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; return readl(mite->mite_io_addr + MITE_FCR(mite_chan->channel)) & 0x000000FF; @@ -702,7 +701,7 @@ static u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan) void mite_dma_disarm(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; unsigned int chor; /* disarm */ @@ -798,7 +797,7 @@ EXPORT_SYMBOL_GPL(mite_sync_dma); static unsigned int mite_get_status(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; unsigned int status; unsigned long flags; @@ -818,7 +817,7 @@ void mite_ack_linkc(struct mite_channel *mite_chan, struct comedi_subdevice *s, bool sync) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; unsigned int status; status = mite_get_status(mite_chan); @@ -840,7 +839,7 @@ EXPORT_SYMBOL_GPL(mite_ack_linkc); int mite_done(struct mite_channel *mite_chan) { - struct mite_struct *mite = mite_chan->mite; + struct mite *mite = mite_chan->mite; unsigned long flags; int done; diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h index 1f8959d85868..93d6a3202417 100644 --- a/drivers/staging/comedi/drivers/mite.h +++ b/drivers/staging/comedi/drivers/mite.h @@ -43,14 +43,14 @@ struct mite_dma_descriptor_ring { }; struct mite_channel { - struct mite_struct *mite; + struct mite *mite; unsigned int channel; int dir; int done; struct mite_dma_descriptor_ring *ring; }; -struct mite_struct { +struct mite { struct pci_dev *pcidev; void __iomem *mite_io_addr; struct mite_channel channels[MAX_MITE_DMA_CHANNELS]; @@ -61,26 +61,26 @@ struct mite_struct { spinlock_t lock; }; -struct mite_struct *mite_alloc(struct pci_dev *pcidev); +struct mite *mite_alloc(struct pci_dev *); -int mite_setup2(struct comedi_device *, struct mite_struct *, bool use_win1); +int mite_setup2(struct comedi_device *, struct mite *, bool use_win1); static inline int mite_setup(struct comedi_device *dev, - struct mite_struct *mite) + struct mite *mite) { return mite_setup2(dev, mite, false); } -void mite_detach(struct mite_struct *mite); -struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite); +void mite_detach(struct mite *); +struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite *); void mite_free_ring(struct mite_dma_descriptor_ring *ring); struct mite_channel * -mite_request_channel_in_range(struct mite_struct *mite, +mite_request_channel_in_range(struct mite *, struct mite_dma_descriptor_ring *ring, unsigned int min_channel, unsigned int max_channel); static inline struct mite_channel * -mite_request_channel(struct mite_struct *mite, +mite_request_channel(struct mite *mite, struct mite_dma_descriptor_ring *ring) { return mite_request_channel_in_range(mite, ring, 0, diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index e745eb9c5fb1..7cc7e28baf92 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -253,7 +253,7 @@ static const struct ni_660x_board ni_660x_boards[] = { NI660X_COUNTERS_PER_CHIP) struct ni_660x_private { - struct mite_struct *mite; + struct mite *mite; struct ni_gpct_device *counter_dev; struct mite_dma_descriptor_ring *mite_rings[NI660X_MAX_CHIPS][NI660X_COUNTERS_PER_CHIP]; diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 4a34da5140e0..9ed8bb819f74 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -284,7 +284,7 @@ static const struct nidio_board nidio_boards[] = { }; struct nidio96_private { - struct mite_struct *mite; + struct mite *mite; int boardtype; int dio; unsigned short OpModeBits; diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 334a2e12fe84..6b46a192091e 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -1033,7 +1033,7 @@ struct ni_private { u8 eeprom_buffer[M_SERIES_EEPROM_SIZE]; __be32 serial_number; - struct mite_struct *mite; + struct mite *mite; struct mite_channel *ai_mite_chan; struct mite_channel *ao_mite_chan; struct mite_channel *cdo_mite_chan; -- cgit v1.2.3