Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933005AbbHXNVz (ORCPT ); Mon, 24 Aug 2015 09:21:55 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:57476 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932941AbbHXNVw (ORCPT ); Mon, 24 Aug 2015 09:21:52 -0400 From: Roger Quadros To: , , , CC: , , , , , , , , , Roger Quadros Subject: [PATCH v4 04/13] otg-fsm: move usb_bus_start_enum into otg-fsm->ops Date: Mon, 24 Aug 2015 16:21:15 +0300 Message-ID: <1440422484-4737-5-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440422484-4737-1-git-send-email-rogerq@ti.com> References: <1440422484-4737-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2145 Lines: 61 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 a46f29a..6e56c8c 100644 --- a/drivers/usb/common/usb-otg-fsm.c +++ b/drivers/usb/common/usb-otg-fsm.c @@ -165,8 +165,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 672551c..75e82cc 100644 --- a/include/linux/usb/otg-fsm.h +++ b/include/linux/usb/otg-fsm.h @@ -199,6 +199,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); }; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/