diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-10-22 16:15:07 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-10-31 09:10:06 -0400 |
commit | b7c041aadad561a84d17851f69414060f8389ce1 (patch) | |
tree | f97023e1181c3f2f080ee44c54ea2fb52e5e7ad5 /drivers/usb | |
parent | 10287baec761d33f0a82d84b46e37a44030350d8 (diff) |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/f_uac2.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/f_uac2.c index 730a260e1841..86f8ac791420 100644 --- a/drivers/usb/gadget/f_uac2.c +++ b/drivers/usb/gadget/f_uac2.c | |||
@@ -50,8 +50,6 @@ static int c_ssize = 2; | |||
50 | module_param(c_ssize, uint, S_IRUGO); | 50 | module_param(c_ssize, uint, S_IRUGO); |
51 | MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)"); | 51 | MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)"); |
52 | 52 | ||
53 | #define DMA_ADDR_INVALID (~(dma_addr_t)0) | ||
54 | |||
55 | #define ALT_SET(x, a) do {(x) &= ~0xff; (x) |= (a); } while (0) | 53 | #define ALT_SET(x, a) do {(x) &= ~0xff; (x) |= (a); } while (0) |
56 | #define ALT_GET(x) ((x) & 0xff) | 54 | #define ALT_GET(x) ((x) & 0xff) |
57 | #define INTF_SET(x, i) do {(x) &= 0xff; (x) |= ((i) << 8); } while (0) | 55 | #define INTF_SET(x, i) do {(x) &= 0xff; (x) |= ((i) << 8); } while (0) |
@@ -1130,7 +1128,6 @@ afunc_set_alt(struct usb_function *fn, unsigned intf, unsigned alt) | |||
1130 | prm->ureq[i].pp = prm; | 1128 | prm->ureq[i].pp = prm; |
1131 | 1129 | ||
1132 | req->zero = 0; | 1130 | req->zero = 0; |
1133 | req->dma = DMA_ADDR_INVALID; | ||
1134 | req->context = &prm->ureq[i]; | 1131 | req->context = &prm->ureq[i]; |
1135 | req->length = prm->max_psize; | 1132 | req->length = prm->max_psize; |
1136 | req->complete = agdev_iso_complete; | 1133 | req->complete = agdev_iso_complete; |
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 76494cabf4e4..8ac840f25ba9 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -76,7 +76,6 @@ MODULE_LICENSE ("GPL"); | |||
76 | /*----------------------------------------------------------------------*/ | 76 | /*----------------------------------------------------------------------*/ |
77 | 77 | ||
78 | #define GADGETFS_MAGIC 0xaee71ee7 | 78 | #define GADGETFS_MAGIC 0xaee71ee7 |
79 | #define DMA_ADDR_INVALID (~(dma_addr_t)0) | ||
80 | 79 | ||
81 | /* /dev/gadget/$CHIP represents ep0 and the whole device */ | 80 | /* /dev/gadget/$CHIP represents ep0 and the whole device */ |
82 | enum ep0_state { | 81 | enum ep0_state { |
@@ -918,7 +917,6 @@ static void clean_req (struct usb_ep *ep, struct usb_request *req) | |||
918 | if (req->buf != dev->rbuf) { | 917 | if (req->buf != dev->rbuf) { |
919 | kfree(req->buf); | 918 | kfree(req->buf); |
920 | req->buf = dev->rbuf; | 919 | req->buf = dev->rbuf; |
921 | req->dma = DMA_ADDR_INVALID; | ||
922 | } | 920 | } |
923 | req->complete = epio_complete; | 921 | req->complete = epio_complete; |
924 | dev->setup_out_ready = 0; | 922 | dev->setup_out_ready = 0; |
@@ -1408,7 +1406,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1408 | dev->setup_abort = 1; | 1406 | dev->setup_abort = 1; |
1409 | 1407 | ||
1410 | req->buf = dev->rbuf; | 1408 | req->buf = dev->rbuf; |
1411 | req->dma = DMA_ADDR_INVALID; | ||
1412 | req->context = NULL; | 1409 | req->context = NULL; |
1413 | value = -EOPNOTSUPP; | 1410 | value = -EOPNOTSUPP; |
1414 | switch (ctrl->bRequest) { | 1411 | switch (ctrl->bRequest) { |