提交 b7c041aa 编写于 作者: S Sebastian Andrzej Siewior 提交者: Felipe Balbi

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: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 10287bae
...@@ -50,8 +50,6 @@ static int c_ssize = 2; ...@@ -50,8 +50,6 @@ static int c_ssize = 2;
module_param(c_ssize, uint, S_IRUGO); module_param(c_ssize, uint, S_IRUGO);
MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)"); MODULE_PARM_DESC(c_ssize, "Capture Sample Size(bytes)");
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
#define ALT_SET(x, a) do {(x) &= ~0xff; (x) |= (a); } while (0) #define ALT_SET(x, a) do {(x) &= ~0xff; (x) |= (a); } while (0)
#define ALT_GET(x) ((x) & 0xff) #define ALT_GET(x) ((x) & 0xff)
#define INTF_SET(x, i) do {(x) &= 0xff; (x) |= ((i) << 8); } while (0) #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,7 +1128,6 @@ afunc_set_alt(struct usb_function *fn, unsigned intf, unsigned alt)
prm->ureq[i].pp = prm; prm->ureq[i].pp = prm;
req->zero = 0; req->zero = 0;
req->dma = DMA_ADDR_INVALID;
req->context = &prm->ureq[i]; req->context = &prm->ureq[i];
req->length = prm->max_psize; req->length = prm->max_psize;
req->complete = agdev_iso_complete; req->complete = agdev_iso_complete;
......
...@@ -76,7 +76,6 @@ MODULE_LICENSE ("GPL"); ...@@ -76,7 +76,6 @@ MODULE_LICENSE ("GPL");
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
#define GADGETFS_MAGIC 0xaee71ee7 #define GADGETFS_MAGIC 0xaee71ee7
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
/* /dev/gadget/$CHIP represents ep0 and the whole device */ /* /dev/gadget/$CHIP represents ep0 and the whole device */
enum ep0_state { enum ep0_state {
...@@ -918,7 +917,6 @@ static void clean_req (struct usb_ep *ep, struct usb_request *req) ...@@ -918,7 +917,6 @@ static void clean_req (struct usb_ep *ep, struct usb_request *req)
if (req->buf != dev->rbuf) { if (req->buf != dev->rbuf) {
kfree(req->buf); kfree(req->buf);
req->buf = dev->rbuf; req->buf = dev->rbuf;
req->dma = DMA_ADDR_INVALID;
} }
req->complete = epio_complete; req->complete = epio_complete;
dev->setup_out_ready = 0; dev->setup_out_ready = 0;
...@@ -1408,7 +1406,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1408,7 +1406,6 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
dev->setup_abort = 1; dev->setup_abort = 1;
req->buf = dev->rbuf; req->buf = dev->rbuf;
req->dma = DMA_ADDR_INVALID;
req->context = NULL; req->context = NULL;
value = -EOPNOTSUPP; value = -EOPNOTSUPP;
switch (ctrl->bRequest) { switch (ctrl->bRequest) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册