From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anurag Kumar Vulisha Subject: [PATCH 2/3] usb: gadget: send usb_gadget as an argument in get_config_params Date: Thu, 2 May 2019 15:50:22 +0530 Message-ID: <1556792423-4833-3-git-send-email-anurag.kumar.vulisha@xilinx.com> References: <1556792423-4833-1-git-send-email-anurag.kumar.vulisha@xilinx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1556792423-4833-1-git-send-email-anurag.kumar.vulisha@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, v.anuragkumar@gmail.com, Anurag Kumar Vulisha List-Id: devicetree@vger.kernel.org Passing struct usb_gadget * as an extra argument in get_config_params makes gadget drivers to easily update the U1DevExitLat & U2DevExitLat values based on the values passed from the device tree. This patch does the same Signed-off-by: Anurag Kumar Vulisha --- drivers/usb/gadget/composite.c | 2 +- include/linux/usb/gadget.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index b8a1584..9118b42 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -653,7 +653,7 @@ static int bos_desc(struct usb_composite_dev *cdev) /* Get Controller configuration */ if (cdev->gadget->ops->get_config_params) { - cdev->gadget->ops->get_config_params( + cdev->gadget->ops->get_config_params(cdev->gadget, &dcd_config_params); } else { dcd_config_params.bU1devExitLat = diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 7595056..fb19141 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -310,7 +310,8 @@ struct usb_gadget_ops { int (*pullup) (struct usb_gadget *, int is_on); int (*ioctl)(struct usb_gadget *, unsigned code, unsigned long param); - void (*get_config_params)(struct usb_dcd_config_params *); + void (*get_config_params)(struct usb_gadget *, + struct usb_dcd_config_params *); int (*udc_start)(struct usb_gadget *, struct usb_gadget_driver *); int (*udc_stop)(struct usb_gadget *); -- 2.1.1