From owner-svn-src-all@freebsd.org Wed Mar 23 19:24:11 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70EF9ADBF44; Wed, 23 Mar 2016 19:24:11 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25E9A1D4D; Wed, 23 Mar 2016 19:24:11 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2NJOAkK071604; Wed, 23 Mar 2016 19:24:10 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2NJOAow071602; Wed, 23 Mar 2016 19:24:10 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201603231924.u2NJOAow071602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Wed, 23 Mar 2016 19:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297214 - head/sys/dev/extres/clk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 19:24:11 -0000 Author: jmcneill Date: Wed Mar 23 19:24:09 2016 New Revision: 297214 URL: https://svnweb.freebsd.org/changeset/base/297214 Log: clk_parse_ofw_out_names is supposed to return a list of indices when the clock-indices property is present, so change the "uint32_t *indices" parameter to "uint32_t **indices" to allow this. Reviewed by: mmel, adrian (mentor) Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5702 Modified: head/sys/dev/extres/clk/clk.c head/sys/dev/extres/clk/clk.h Modified: head/sys/dev/extres/clk/clk.c ============================================================================== --- head/sys/dev/extres/clk/clk.c Wed Mar 23 19:21:21 2016 (r297213) +++ head/sys/dev/extres/clk/clk.c Wed Mar 23 19:24:09 2016 (r297214) @@ -1272,12 +1272,12 @@ clk_get_by_ofw_name(device_t dev, const */ int clk_parse_ofw_out_names(device_t dev, phandle_t node, const char ***out_names, - uint32_t *indices) + uint32_t **indices) { int name_items, rv; *out_names = NULL; - indices = NULL; + *indices = NULL; if (!OF_hasprop(node, "clock-output-names")) return (0); rv = ofw_bus_string_list_to_array(node, "clock-output-names", @@ -1294,7 +1294,7 @@ clk_parse_ofw_out_names(device_t dev, ph device_printf(dev, " Size of 'clock-output-names' and " "'clock-indices' differs\n"); free(*out_names, M_OFWPROP); - free(indices, M_OFWPROP); + free(*indices, M_OFWPROP); return (0); } return (name_items); Modified: head/sys/dev/extres/clk/clk.h ============================================================================== --- head/sys/dev/extres/clk/clk.h Wed Mar 23 19:21:21 2016 (r297213) +++ head/sys/dev/extres/clk/clk.h Wed Mar 23 19:24:09 2016 (r297214) @@ -132,7 +132,7 @@ const char *clk_get_name(clk_t clk); int clk_get_by_ofw_index(device_t dev, int idx, clk_t *clk); int clk_get_by_ofw_name(device_t dev, const char *name, clk_t *clk); int clk_parse_ofw_out_names(device_t dev, phandle_t node, - const char ***out_names, uint32_t *indices); + const char ***out_names, uint32_t **indices); int clk_parse_ofw_clk_name(device_t dev, phandle_t node, const char **name); #endif