From patchwork Tue Nov 10 00:34:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7587171 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1FEB39F1AF for ; Tue, 10 Nov 2015 00:40:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 571BA2069D for ; Tue, 10 Nov 2015 00:40:22 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AB3020696 for ; Tue, 10 Nov 2015 00:40:21 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8023A1A1FD2; Mon, 9 Nov 2015 16:40:21 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id 235431A1FD2 for ; Mon, 9 Nov 2015 16:40:21 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 09 Nov 2015 16:40:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,267,1444719600"; d="scan'208";a="597226421" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.39]) by FMSMGA003.fm.intel.com with ESMTP; 09 Nov 2015 16:40:18 -0800 Subject: [PATCH 1/4] ndctl: export ndctl_bus_get_ctx From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 09 Nov 2015 19:34:35 -0500 Message-ID: <20151110003435.18262.16786.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20151110003430.18262.20700.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20151110003430.18262.20700.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 It's generally useful to have access to the 'ctx' from 'bus' and we take advantage of this capability in subsequent changes. Signed-off-by: Dan Williams Acked-by: Vishal Verma --- lib/libndctl.c | 2 +- lib/libndctl.sym | 1 + lib/ndctl/libndctl.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libndctl.c b/lib/libndctl.c index 326b43ec1857..6bfc79f95b83 100644 --- a/lib/libndctl.c +++ b/lib/libndctl.c @@ -1084,7 +1084,7 @@ NDCTL_EXPORT const char *ndctl_bus_get_provider(struct ndctl_bus *bus) return bus->provider; } -struct ndctl_ctx *ndctl_bus_get_ctx(struct ndctl_bus *bus) +NDCTL_EXPORT struct ndctl_ctx *ndctl_bus_get_ctx(struct ndctl_bus *bus) { return bus->ctx; } diff --git a/lib/libndctl.sym b/lib/libndctl.sym index cf99d6f8d2f0..22fa12e29649 100644 --- a/lib/libndctl.sym +++ b/lib/libndctl.sym @@ -30,6 +30,7 @@ global: ndctl_bus_get_revision; ndctl_bus_get_id; ndctl_bus_get_provider; + ndctl_bus_get_ctx; ndctl_bus_wait_probe; ndctl_dimm_get_first; ndctl_dimm_get_next; diff --git a/lib/ndctl/libndctl.h b/lib/ndctl/libndctl.h index 3ccffa9093b9..1bef168935b0 100644 --- a/lib/ndctl/libndctl.h +++ b/lib/ndctl/libndctl.h @@ -105,6 +105,7 @@ int ndctl_bus_is_cmd_supported(struct ndctl_bus *bus, int cmd); unsigned int ndctl_bus_get_revision(struct ndctl_bus *bus); unsigned int ndctl_bus_get_id(struct ndctl_bus *bus); const char *ndctl_bus_get_provider(struct ndctl_bus *bus); +struct ndctl_ctx *ndctl_bus_get_ctx(struct ndctl_bus *bus); int ndctl_bus_wait_probe(struct ndctl_bus *bus); struct ndctl_dimm;