Commit b7c041aadad561a84d17851f69414060f8389ce1

Authored by Sebastian Andrzej Siewior
Committed by Felipe Balbi
1 parent 10287baec7

usb: gadget: remove DMA_ADDR_INVALID from f_uac2 and gadgetfs

DMA_ADDR_INVALID is used by the UDC driver and the gadgets should
provide only a buffer address. Everything else should be taken core of
by the UDC and udc-core.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>

Showing 2 changed files with 0 additions and 6 deletions Side-by-side Diff

drivers/usb/gadget/f_uac2.c
... ... @@ -50,8 +50,6 @@
50 50 module_param(c_ssize, uint, S_IRUGO);
51 51 MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)");
52 52  
53   -#define DMA_ADDR_INVALID (~(dma_addr_t)0)
54   -
55 53 #define ALT_SET(x, a) do {(x) &= ~0xff; (x) |= (a); } while (0)
56 54 #define ALT_GET(x) ((x) & 0xff)
57 55 #define INTF_SET(x, i) do {(x) &= 0xff; (x) |= ((i) << 8); } while (0)
... ... @@ -1130,7 +1128,6 @@
1130 1128 prm->ureq[i].pp = prm;
1131 1129  
1132 1130 req->zero = 0;
1133   - req->dma = DMA_ADDR_INVALID;
1134 1131 req->context = &prm->ureq[i];
1135 1132 req->length = prm->max_psize;
1136 1133 req->complete = agdev_iso_complete;
drivers/usb/gadget/inode.c
... ... @@ -76,7 +76,6 @@
76 76 /*----------------------------------------------------------------------*/
77 77  
78 78 #define GADGETFS_MAGIC 0xaee71ee7
79   -#define DMA_ADDR_INVALID (~(dma_addr_t)0)
80 79  
81 80 /* /dev/gadget/$CHIP represents ep0 and the whole device */
82 81 enum ep0_state {
... ... @@ -918,7 +917,6 @@
918 917 if (req->buf != dev->rbuf) {
919 918 kfree(req->buf);
920 919 req->buf = dev->rbuf;
921   - req->dma = DMA_ADDR_INVALID;
922 920 }
923 921 req->complete = epio_complete;
924 922 dev->setup_out_ready = 0;
... ... @@ -1408,7 +1406,6 @@
1408 1406 dev->setup_abort = 1;
1409 1407  
1410 1408 req->buf = dev->rbuf;
1411   - req->dma = DMA_ADDR_INVALID;
1412 1409 req->context = NULL;
1413 1410 value = -EOPNOTSUPP;
1414 1411 switch (ctrl->bRequest) {