From patchwork Tue May 8 19:06:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Phillips X-Patchwork-Id: 10387437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A38760353 for ; Tue, 8 May 2018 19:06:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E71E29045 for ; Tue, 8 May 2018 19:06:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02B2529048; Tue, 8 May 2018 19:06:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C20B729045 for ; Tue, 8 May 2018 19:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:Message-Id:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qIs5tvH5TQfm1FfCr4ITGBkr7rsGteHBSkFcPXw8q5w=; b=mtV1FJH03JNYE1 IllIS9qT3qJ5EykR9XHGqsEPPjwXhff15aqdMsKN+1o54+ZTMcF62RN3CJF+OuDnutuKcUQ/Li1Xo 4+esP0gQ5RcR3t5xJvRS/x+qvCyjZ2O4Qb47fC7yyyH+7nsXDyEf2HTy3qgl2JqogXLekXtcF4Obq s6lQLhqY2MHK5zUVp2hSHVKqGG/7ULUGyIIRsQQeSh0kX8dJMZVHUddpzCXA6qRxbQyGVK82MnPk9 sspK7ZziTo4TlJkNZc+pF03EMqs+0cSbh/03//iBSOUDVRObUEGTcrMrfPl6KLaUtfGhFBVh8LgcQ wEwAG+3jQV+g9ARKBskg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fG7wk-0003xS-IZ; Tue, 08 May 2018 19:06:46 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fG7wf-0003ly-7z for linux-arm-kernel@lists.infradead.org; Tue, 08 May 2018 19:06:42 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 202B01529; Tue, 8 May 2018 12:06:30 -0700 (PDT) Received: from dupont (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D2C1B3F58C; Tue, 8 May 2018 12:06:28 -0700 (PDT) Date: Tue, 8 May 2018 14:06:28 -0500 From: Kim Phillips To: Mathieu Poirier Subject: [PATCH 1/4] amba: Export amba_bustype Message-Id: <20180508140628.f30774c70c4c481bff3f8000@arm.com> Organization: Arm X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180508_120641_295006_3E61122F X-CRM114-Status: GOOD ( 15.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang , Kim Phillips , Geert Uytterhoeven , Alexander Shishkin , Oleg Nesterov , David Howells , Russell King , Pavel Tatashin , Thierry Reding , Rik van Riel , Eric Auger , Alex Williamson , Kirill Tkhai , Gargi Sharma , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Mike Rapoport , Eric Biederman , Andrew Morton , Robin Murphy , Todd Kjos Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is provided in the context of allowing the Coresight driver subsystem to be loaded as modules. Coresight uses amba_bus in its call to bus_find_device() in of_coresight_get_endpoint_device() when searching for a configurable endpoint device. This patch allows Coresight to reference amba_bustype when built as a module. Cc: Mathieu Poirier Cc: Alex Williamson Cc: Eric Auger Cc: Russell King Cc: Greg Kroah-Hartman Cc: Todd Kjos Cc: Geert Uytterhoeven Cc: Thierry Reding Cc: Robin Murphy Signed-off-by: Kim Phillips Reviewed-by: Ulf Hansson --- There was a prior patch submitted by Alex W. here: https://lkml.org/lkml/2017/6/19/811 But I can't tell its fate - presume simply delayed? Coresight uses amba_bus in its call to bus_find_device() here: https://lxr.missinglinkelectronics.com/linux/drivers/hwtracing/coresight/of_coresight.c#L51 Grepping for bus_type and EXPORT shows other busses exporting their type, so I don't think this is the wrong approach. If, OTOH, Coresight needs to do something differently, please comment. drivers/amba/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 594c228d2f02..12283bd06733 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -197,6 +197,7 @@ struct bus_type amba_bustype = { .pm = &amba_pm, .force_dma = true, }; +EXPORT_SYMBOL_GPL(amba_bustype); static int __init amba_init(void) {