Commit d35a42cb authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace pPrivateData with private_data

Search and replace pPrivateData with private_data
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent f541b60c
...@@ -102,7 +102,7 @@ static void __init cppi_pool_init(struct cppi *cppi, struct cppi_channel *c) ...@@ -102,7 +102,7 @@ static void __init cppi_pool_init(struct cppi *cppi, struct cppi_channel *c)
c->Channel.bStatus = MGC_DMA_STATUS_UNKNOWN; c->Channel.bStatus = MGC_DMA_STATUS_UNKNOWN;
c->pController = cppi; c->pController = cppi;
c->bLastModeRndis = 0; c->bLastModeRndis = 0;
c->Channel.pPrivateData = c; c->Channel.private_data = c;
c->bdPoolHead = NULL; c->bdPoolHead = NULL;
/* build the BD Free list for the channel */ /* build the BD Free list for the channel */
...@@ -325,7 +325,7 @@ cppi_channel_allocate(struct dma_controller *c, ...@@ -325,7 +325,7 @@ cppi_channel_allocate(struct dma_controller *c,
otgCh->Channel.bStatus = MGC_DMA_STATUS_FREE; otgCh->Channel.bStatus = MGC_DMA_STATUS_FREE;
DBG(4, "Allocate CPPI%d %cX\n", chNum, bTransmit ? 'T' : 'R'); DBG(4, "Allocate CPPI%d %cX\n", chNum, bTransmit ? 'T' : 'R');
otgCh->Channel.pPrivateData = otgCh; otgCh->Channel.private_data = otgCh;
return &otgCh->Channel; return &otgCh->Channel;
} }
...@@ -953,7 +953,7 @@ static int cppi_channel_program(struct dma_channel *pChannel, ...@@ -953,7 +953,7 @@ static int cppi_channel_program(struct dma_channel *pChannel,
u16 wPacketSz, u8 mode, u16 wPacketSz, u8 mode,
dma_addr_t dma_addr, u32 dwLength) dma_addr_t dma_addr, u32 dwLength)
{ {
struct cppi_channel *otgChannel = pChannel->pPrivateData; struct cppi_channel *otgChannel = pChannel->private_data;
struct cppi *pController = otgChannel->pController; struct cppi *pController = otgChannel->pController;
struct musb *musb = pController->musb; struct musb *musb = pController->musb;
...@@ -1316,7 +1316,7 @@ dma_controller_create(struct musb *musb, void __iomem *pCoreBase) ...@@ -1316,7 +1316,7 @@ dma_controller_create(struct musb *musb, void __iomem *pCoreBase)
/* Initialize the Cppi DmaController structure */ /* Initialize the Cppi DmaController structure */
pController->pCoreBase = pCoreBase; pController->pCoreBase = pCoreBase;
pController->musb = musb; pController->musb = musb;
pController->Controller.pPrivateData = pController; pController->Controller.private_data = pController;
pController->Controller.start = cppi_controller_start; pController->Controller.start = cppi_controller_start;
pController->Controller.stop = cppi_controller_stop; pController->Controller.stop = cppi_controller_stop;
pController->Controller.channel_alloc = cppi_channel_allocate; pController->Controller.channel_alloc = cppi_channel_allocate;
......
...@@ -100,7 +100,7 @@ struct dma_controller; ...@@ -100,7 +100,7 @@ struct dma_controller;
/** /**
* struct dma_channel - A DMA channel. * struct dma_channel - A DMA channel.
* @pPrivateData: channel-private data * @private_data: channel-private data
* @wMaxLength: the maximum number of bytes the channel can move in one * @wMaxLength: the maximum number of bytes the channel can move in one
* transaction (typically representing many USB maximum-sized packets) * transaction (typically representing many USB maximum-sized packets)
* @dwActualLength: how many bytes have been transferred * @dwActualLength: how many bytes have been transferred
...@@ -111,7 +111,7 @@ struct dma_controller; ...@@ -111,7 +111,7 @@ struct dma_controller;
* one usb transfer. * one usb transfer.
*/ */
struct dma_channel { struct dma_channel {
void *pPrivateData; void *private_data;
// FIXME not void* private_data, but a dma_controller * // FIXME not void* private_data, but a dma_controller *
size_t dwMaxLength; size_t dwMaxLength;
size_t dwActualLength; size_t dwActualLength;
...@@ -156,7 +156,7 @@ dma_channel_status(struct dma_channel *c) ...@@ -156,7 +156,7 @@ dma_channel_status(struct dma_channel *c)
/** /**
* struct dma_controller - A DMA Controller. * struct dma_controller - A DMA Controller.
* @pPrivateData: controller-private data; * @private_data: controller-private data;
* @start: call this to start a DMA controller; * @start: call this to start a DMA controller;
* return 0 on success, else negative errno * return 0 on success, else negative errno
* @stop: call this to stop a DMA controller * @stop: call this to stop a DMA controller
...@@ -169,7 +169,7 @@ dma_channel_status(struct dma_channel *c) ...@@ -169,7 +169,7 @@ dma_channel_status(struct dma_channel *c)
* Controllers manage dma channels. * Controllers manage dma channels.
*/ */
struct dma_controller { struct dma_controller {
void *pPrivateData; void *private_data;
int (*start)(struct dma_controller *); int (*start)(struct dma_controller *);
int (*stop)(struct dma_controller *); int (*stop)(struct dma_controller *);
struct dma_channel *(*channel_alloc)(struct dma_controller *, struct dma_channel *(*channel_alloc)(struct dma_controller *,
......
...@@ -143,7 +143,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c, ...@@ -143,7 +143,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c,
pImplChannel->epnum = hw_ep->epnum; pImplChannel->epnum = hw_ep->epnum;
pImplChannel->bTransmit = bTransmit; pImplChannel->bTransmit = bTransmit;
pChannel = &(pImplChannel->Channel); pChannel = &(pImplChannel->Channel);
pChannel->pPrivateData = pImplChannel; pChannel->private_data = pImplChannel;
pChannel->bStatus = MGC_DMA_STATUS_FREE; pChannel->bStatus = MGC_DMA_STATUS_FREE;
pChannel->dwMaxLength = 0x10000; pChannel->dwMaxLength = 0x10000;
/* Tx => mode 1; Rx => mode 0 */ /* Tx => mode 1; Rx => mode 0 */
...@@ -158,7 +158,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c, ...@@ -158,7 +158,7 @@ static struct dma_channel* dma_channel_allocate(struct dma_controller *c,
static void dma_channel_release(struct dma_channel *pChannel) static void dma_channel_release(struct dma_channel *pChannel)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
(struct musb_dma_channel *) pChannel->pPrivateData; (struct musb_dma_channel *) pChannel->private_data;
pChannel->dwActualLength = 0; pChannel->dwActualLength = 0;
pImplChannel->dwStartAddress = 0; pImplChannel->dwStartAddress = 0;
...@@ -175,7 +175,7 @@ static void configure_channel(struct dma_channel *pChannel, ...@@ -175,7 +175,7 @@ static void configure_channel(struct dma_channel *pChannel,
dma_addr_t dma_addr, u32 dwLength) dma_addr_t dma_addr, u32 dwLength)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
(struct musb_dma_channel *) pChannel->pPrivateData; (struct musb_dma_channel *) pChannel->private_data;
struct musb_dma_controller *pController = pImplChannel->pController; struct musb_dma_controller *pController = pImplChannel->pController;
u8 *mbase = pController->pCoreBase; u8 *mbase = pController->pCoreBase;
u8 bChannel = pImplChannel->bIndex; u8 bChannel = pImplChannel->bIndex;
...@@ -225,7 +225,7 @@ static int dma_channel_program(struct dma_channel * pChannel, ...@@ -225,7 +225,7 @@ static int dma_channel_program(struct dma_channel * pChannel,
dma_addr_t dma_addr, u32 dwLength) dma_addr_t dma_addr, u32 dwLength)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
(struct musb_dma_channel *) pChannel->pPrivateData; (struct musb_dma_channel *) pChannel->private_data;
DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n", DBG(2, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
pImplChannel->epnum, pImplChannel->epnum,
...@@ -254,7 +254,7 @@ static int dma_channel_program(struct dma_channel * pChannel, ...@@ -254,7 +254,7 @@ static int dma_channel_program(struct dma_channel * pChannel,
static int dma_channel_abort(struct dma_channel *pChannel) static int dma_channel_abort(struct dma_channel *pChannel)
{ {
struct musb_dma_channel *pImplChannel = struct musb_dma_channel *pImplChannel =
(struct musb_dma_channel *) pChannel->pPrivateData; (struct musb_dma_channel *) pChannel->private_data;
u8 bChannel = pImplChannel->bIndex; u8 bChannel = pImplChannel->bIndex;
u8 *mbase = pImplChannel->pController->pCoreBase; u8 *mbase = pImplChannel->pController->pCoreBase;
u16 csr; u16 csr;
...@@ -294,10 +294,10 @@ static int dma_channel_abort(struct dma_channel *pChannel) ...@@ -294,10 +294,10 @@ static int dma_channel_abort(struct dma_channel *pChannel)
return 0; return 0;
} }
static irqreturn_t dma_controller_irq(int irq, void *pPrivateData) static irqreturn_t dma_controller_irq(int irq, void *private_data)
{ {
struct musb_dma_controller *pController = struct musb_dma_controller *pController =
(struct musb_dma_controller *)pPrivateData; (struct musb_dma_controller *)private_data;
struct musb_dma_channel *pImplChannel; struct musb_dma_channel *pImplChannel;
u8 *mbase = pController->pCoreBase; u8 *mbase = pController->pCoreBase;
struct dma_channel *pChannel; struct dma_channel *pChannel;
...@@ -374,7 +374,7 @@ done: ...@@ -374,7 +374,7 @@ done:
void dma_controller_destroy(struct dma_controller *c) void dma_controller_destroy(struct dma_controller *c)
{ {
struct musb_dma_controller *pController = struct musb_dma_controller *pController =
(struct musb_dma_controller *) c->pPrivateData; (struct musb_dma_controller *) c->private_data;
if (!pController) if (!pController)
return; return;
...@@ -383,7 +383,7 @@ void dma_controller_destroy(struct dma_controller *c) ...@@ -383,7 +383,7 @@ void dma_controller_destroy(struct dma_controller *c)
free_irq(pController->irq, c); free_irq(pController->irq, c);
kfree(pController); kfree(pController);
c->pPrivateData = NULL; c->private_data = NULL;
} }
struct dma_controller *__init struct dma_controller *__init
...@@ -407,7 +407,7 @@ dma_controller_create(struct musb *musb, void __iomem *pCoreBase) ...@@ -407,7 +407,7 @@ dma_controller_create(struct musb *musb, void __iomem *pCoreBase)
pController->pDmaPrivate = musb; pController->pDmaPrivate = musb;
pController->pCoreBase = pCoreBase; pController->pCoreBase = pCoreBase;
pController->Controller.pPrivateData = pController; pController->Controller.private_data = pController;
pController->Controller.start = dma_controller_start; pController->Controller.start = dma_controller_start;
pController->Controller.stop = dma_controller_stop; pController->Controller.stop = dma_controller_stop;
pController->Controller.channel_alloc = dma_channel_allocate; pController->Controller.channel_alloc = dma_channel_allocate;
......
...@@ -1810,7 +1810,7 @@ static void musb_free(struct musb *musb) ...@@ -1810,7 +1810,7 @@ static void musb_free(struct musb *musb)
if (is_dma_capable() && musb->dma_controller) { if (is_dma_capable() && musb->dma_controller) {
struct dma_controller *c = musb->dma_controller; struct dma_controller *c = musb->dma_controller;
(void) c->stop(c->pPrivateData); (void) c->stop(c->private_data);
dma_controller_destroy(c); dma_controller_destroy(c);
} }
...@@ -1923,7 +1923,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -1923,7 +1923,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
c = dma_controller_create(musb, musb->mregs); c = dma_controller_create(musb, musb->mregs);
musb->dma_controller = c; musb->dma_controller = c;
if (c) if (c)
(void) c->start(c->pPrivateData); (void) c->start(c->private_data);
} }
#endif #endif
/* ideally this would be abstracted in platform setup */ /* ideally this would be abstracted in platform setup */
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define dmareq_works() 1 #define dmareq_works() 1
#endif #endif
#define to_chdat(c) (struct tusb_omap_dma_ch *)(c)->pPrivateData #define to_chdat(c) (struct tusb_omap_dma_ch *)(c)->private_data
#define MAX_DMAREQ 5 /* REVISIT: Really 6, but req5 not OK */ #define MAX_DMAREQ 5 /* REVISIT: Really 6, but req5 not OK */
...@@ -524,7 +524,7 @@ tusb_omap_dma_allocate(struct dma_controller *c, ...@@ -524,7 +524,7 @@ tusb_omap_dma_allocate(struct dma_controller *c,
if (ch->bStatus == MGC_DMA_STATUS_UNKNOWN) { if (ch->bStatus == MGC_DMA_STATUS_UNKNOWN) {
ch->bStatus = MGC_DMA_STATUS_FREE; ch->bStatus = MGC_DMA_STATUS_FREE;
channel = ch; channel = ch;
chdat = ch->pPrivateData; chdat = ch->private_data;
break; break;
} }
} }
...@@ -640,8 +640,8 @@ void dma_controller_destroy(struct dma_controller *c) ...@@ -640,8 +640,8 @@ void dma_controller_destroy(struct dma_controller *c)
for (i = 0; i < MAX_DMAREQ; i++) { for (i = 0; i < MAX_DMAREQ; i++) {
struct dma_channel *ch = dma_channel_pool[i]; struct dma_channel *ch = dma_channel_pool[i];
if (ch) { if (ch) {
if (ch->pPrivateData) if (ch->private_data)
kfree(ch->pPrivateData); kfree(ch->private_data);
kfree(ch); kfree(ch);
} }
} }
...@@ -686,7 +686,7 @@ dma_controller_create(struct musb *musb, void __iomem *base) ...@@ -686,7 +686,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
tusb_dma->controller.channel_release = tusb_omap_dma_release; tusb_dma->controller.channel_release = tusb_omap_dma_release;
tusb_dma->controller.channel_program = tusb_omap_dma_program; tusb_dma->controller.channel_program = tusb_omap_dma_program;
tusb_dma->controller.channel_abort = tusb_omap_dma_abort; tusb_dma->controller.channel_abort = tusb_omap_dma_abort;
tusb_dma->controller.pPrivateData = tusb_dma; tusb_dma->controller.private_data = tusb_dma;
for (i = 0; i < MAX_DMAREQ; i++) { for (i = 0; i < MAX_DMAREQ; i++) {
struct dma_channel *ch; struct dma_channel *ch;
...@@ -703,7 +703,7 @@ dma_controller_create(struct musb *musb, void __iomem *base) ...@@ -703,7 +703,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
goto cleanup; goto cleanup;
ch->bStatus = MGC_DMA_STATUS_UNKNOWN; ch->bStatus = MGC_DMA_STATUS_UNKNOWN;
ch->pPrivateData = chdat; ch->private_data = chdat;
} }
return &tusb_dma->controller; return &tusb_dma->controller;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment