Re: [PATCH v2 1/9] usb: gadget: add generic map/unmap request utilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Felipe Balbi | 2011-12-20 18:37:05 [+0200]:

>diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
>index 0b0d12c..f270c9d 100644
>--- a/drivers/usb/gadget/udc-core.c
>+++ b/drivers/usb/gadget/udc-core.c
>@@ -49,6 +50,57 @@ static DEFINE_MUTEX(udc_lock);
> 
> /* ------------------------------------------------------------------------- */
> 
>+int usb_gadget_map_request(struct usb_gadget *gadget,
>+		struct usb_request *req, int is_in)
>+{
>+	if (req->length == 0)
>+		return 0;
>+
>+	if (req->num_sgs) {
>+		int     mapped;
>+
>+		mapped = dma_map_sg(&gadget->dev, req->sg, req->num_sgs,

Sorry for not comming up with this earlier but I'm not sure if this the
same as calling it with the _real_ device. After all the device may have
dma_ops set and I'm not sure if this is copied here.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux