clk-flexgen.c (8e6dd77ccc324a57d5f37c7f8b1e37319fb2e2b3) | clk-flexgen.c (0a65239c280bb0d56d8d84c4a9cc78bc68144925) |
---|---|
1/* 2 * clk-flexgen.c 3 * 4 * Copyright (C) ST-Microelectronics SA 2013 5 * Author: Maxime Coquelin <maxime.coquelin@st.com> for ST-Microelectronics. 6 * License terms: GNU General Public License (GPL), version 2 */ 7 8#include <linux/clk-provider.h> --- 231 unchanged lines hidden (view full) --- 240} 241 242static const char ** __init flexgen_get_parents(struct device_node *np, 243 int *num_parents) 244{ 245 const char **parents; 246 int nparents, i; 247 | 1/* 2 * clk-flexgen.c 3 * 4 * Copyright (C) ST-Microelectronics SA 2013 5 * Author: Maxime Coquelin <maxime.coquelin@st.com> for ST-Microelectronics. 6 * License terms: GNU General Public License (GPL), version 2 */ 7 8#include <linux/clk-provider.h> --- 231 unchanged lines hidden (view full) --- 240} 241 242static const char ** __init flexgen_get_parents(struct device_node *np, 243 int *num_parents) 244{ 245 const char **parents; 246 int nparents, i; 247 |
248 nparents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); | 248 nparents = of_clk_get_parent_count(np); |
249 if (WARN_ON(nparents <= 0)) 250 return NULL; 251 252 parents = kcalloc(nparents, sizeof(const char *), GFP_KERNEL); 253 if (!parents) 254 return NULL; 255 256 for (i = 0; i < nparents; i++) --- 86 unchanged lines hidden --- | 249 if (WARN_ON(nparents <= 0)) 250 return NULL; 251 252 parents = kcalloc(nparents, sizeof(const char *), GFP_KERNEL); 253 if (!parents) 254 return NULL; 255 256 for (i = 0; i < nparents; i++) --- 86 unchanged lines hidden --- |