Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2016 19:24:10 +0000 (UTC)
From:      Jared McNeill <jmcneill@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297214 - head/sys/dev/extres/clk
Message-ID:  <201603231924.u2NJOAow071602@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603231924.u2NJOAow071602>