Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289581
b: refs/heads/master
c: 6e4b74e
h: refs/heads/master
i:
  289579: ce461f3
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Felipe Balbi committed Feb 14, 2012
1 parent e5d4bde commit 05eb261
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5261286949fc9ada701c7e30bf89e08a6dbf4de
refs/heads/master: 6e4b74e4690dd03b5664fa4895c3db0607d64742
18 changes: 6 additions & 12 deletions trunk/drivers/usb/renesas_usbhs/fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,9 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
}

static void usbhsf_dma_complete(void *arg);
static void usbhsf_dma_prepare_tasklet(unsigned long data)
static void xfer_work(struct work_struct *work)
{
struct usbhs_pkt *pkt = (struct usbhs_pkt *)data;
struct usbhs_pkt *pkt = container_of(work, struct usbhs_pkt, work);
struct usbhs_pipe *pipe = pkt->pipe;
struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
Expand Down Expand Up @@ -847,11 +847,8 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)

pkt->trans = len;

tasklet_init(&fifo->tasklet,
usbhsf_dma_prepare_tasklet,
(unsigned long)pkt);

tasklet_schedule(&fifo->tasklet);
INIT_WORK(&pkt->work, xfer_work);
schedule_work(&pkt->work);

return 0;

Expand Down Expand Up @@ -941,11 +938,8 @@ static int usbhsf_dma_try_pop(struct usbhs_pkt *pkt, int *is_done)

pkt->trans = len;

tasklet_init(&fifo->tasklet,
usbhsf_dma_prepare_tasklet,
(unsigned long)pkt);

tasklet_schedule(&fifo->tasklet);
INIT_WORK(&pkt->work, xfer_work);
schedule_work(&pkt->work);

return 0;

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/renesas_usbhs/fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <linux/interrupt.h>
#include <linux/sh_dma.h>
#include <linux/workqueue.h>
#include <asm/dma.h>
#include "pipe.h"

Expand All @@ -31,7 +32,6 @@ struct usbhs_fifo {
u32 ctr; /* xFIFOCTR */

struct usbhs_pipe *pipe;
struct tasklet_struct tasklet;

struct dma_chan *tx_chan;
struct dma_chan *rx_chan;
Expand All @@ -53,6 +53,7 @@ struct usbhs_pkt {
struct usbhs_pkt_handle *handler;
void (*done)(struct usbhs_priv *priv,
struct usbhs_pkt *pkt);
struct work_struct work;
dma_addr_t dma;
void *buf;
int length;
Expand Down

0 comments on commit 05eb261

Please sign in to comment.