From patchwork Wed Jul 8 10:19:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 6744231 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D91EBC05AC for ; Wed, 8 Jul 2015 10:22:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EEB4206F4 for ; Wed, 8 Jul 2015 10:22:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 294BA206E9 for ; Wed, 8 Jul 2015 10:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964826AbbGHKUL (ORCPT ); Wed, 8 Jul 2015 06:20:11 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:37245 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964823AbbGHKUH (ORCPT ); Wed, 8 Jul 2015 06:20:07 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t68AK04G012601; Wed, 8 Jul 2015 05:20:00 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t68AK0rF013979; Wed, 8 Jul 2015 05:20:00 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Wed, 8 Jul 2015 05:19:45 -0500 Received: from rockdesk.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t68AJg6Y013513; Wed, 8 Jul 2015 05:19:56 -0500 From: Roger Quadros To: , , , CC: , , , , , , , , Roger Quadros Subject: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm->ops Date: Wed, 8 Jul 2015 13:19:30 +0300 Message-ID: <1436350777-28056-5-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436350777-28056-1-git-send-email-rogerq@ti.com> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/common/usb-otg-fsm.c | 6 ++++-- drivers/usb/phy/phy-fsl-usb.c | 2 ++ include/linux/usb/otg-fsm.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c index 1873eb3..156fd25 100644 --- a/drivers/usb/common/usb-otg-fsm.c +++ b/drivers/usb/common/usb-otg-fsm.c @@ -166,8 +166,10 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) otg_loc_conn(fsm, 0); otg_loc_sof(fsm, 1); otg_set_protocol(fsm, PROTO_HOST); - usb_bus_start_enum(fsm->otg->host, - fsm->otg->host->otg_port); + if (fsm->ops->start_enum) { + fsm->ops->start_enum(fsm->otg->host, + fsm->otg->host->otg_port); + } break; case OTG_STATE_A_IDLE: otg_drv_vbus(fsm, 0); diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index ee3f2c2..19541ed 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -783,6 +783,8 @@ static struct otg_fsm_ops fsl_otg_ops = { .start_host = fsl_otg_start_host, .start_gadget = fsl_otg_start_gadget, + + .start_enum = usb_bus_start_enum, }; /* Initialize the global variable fsl_otg_dev and request IRQ for OTG */ diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h index c631dde..22d8baa 100644 --- a/include/linux/usb/otg-fsm.h +++ b/include/linux/usb/otg-fsm.h @@ -198,6 +198,7 @@ struct otg_fsm_ops { void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); int (*start_host)(struct otg_fsm *fsm, int on); int (*start_gadget)(struct otg_fsm *fsm, int on); + int (*start_enum)(struct usb_bus *bus, unsigned port_num); };