Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36331641 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge branch 'clk-cleanup' into clk-next

* clk-cleanup:
  clk: kona-setup: Delete error messages for failed memory allocations
  ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
  clk: cdce925: remove redundant check for non-null parent_name
  clk: versatile: Improve sizeof() usage
  clk: versatile: Delete error messages for failed memory allocations
  clk: ux500: Improve sizeof() usage
  clk: ux500: Delete error messages for failed memory allocations
  clk: spear: Delete error messages for failed memory allocations
  clk: ti: Delete error messages for failed memory allocations
  clk: mmp: Adjust checks for NULL pointers
  clk: mmp: Use common error handling code in mmp_clk_register_mix()
  clk: mmp: Delete error messages for failed memory allocations
  clk: clk-xgene: Adjust six checks for null pointers
  clk: clk-xgene: Delete error messages for failed memory allocations
  clk: clk-u300: Fix a typo in two comment lines
  clk: clk-u300: Add some spaces for better code readability
  clk: clk-u300: Improve sizeof() usage
  clk: clk-u300: Delete error messages for failed memory allocations
  clk: clk-mux: Improve a size determination in clk_hw_register_mux_table()
  clk: clk-mux: Delete an error message for a failed memory allocation
parents c1ea839c 98c58f7d
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -579,18 +579,13 @@ static u32 *parent_process(const char *clocks[],
	 */
	parent_names = kmalloc_array(parent_count, sizeof(*parent_names),
			       GFP_KERNEL);
	if (!parent_names) {
		pr_err("%s: error allocating %u parent names\n", __func__,
				parent_count);
	if (!parent_names)
		return ERR_PTR(-ENOMEM);
	}

	/* There is at least one parent, so allocate a selector array */
	parent_sel = kmalloc_array(parent_count, sizeof(*parent_sel),
				   GFP_KERNEL);
	if (!parent_sel) {
		pr_err("%s: error allocating %u parent selectors\n", __func__,
				parent_count);
		kfree(parent_names);

		return ERR_PTR(-ENOMEM);
+1 −1
Original line number Diff line number Diff line
@@ -665,7 +665,7 @@ static int cdce925_probe(struct i2c_client *client,
	init.ops = &cdce925_pll_ops;
	init.flags = 0;
	init.parent_names = &parent_name;
	init.num_parents = parent_name ? 1 : 0;
	init.num_parents = 1;

	/* Register PLL clocks */
	for (i = 0; i < data->chip_info->num_plls; ++i) {
+2 −2
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static inline void hsdk_pll_set_cfg(struct hsdk_pll_clk *clk,
	val |= cfg->odiv << CGU_PLL_CTRL_ODIV_SHIFT;
	val |= cfg->band << CGU_PLL_CTRL_BAND_SHIFT;

	dev_dbg(clk->dev, "write configurarion: %#x\n", val);
	dev_dbg(clk->dev, "write configuration: %#x\n", val);

	hsdk_pll_write(clk, CGU_PLL_CTRL, val);
}
@@ -169,7 +169,7 @@ static unsigned long hsdk_pll_recalc_rate(struct clk_hw *hw,

	val = hsdk_pll_read(clk, CGU_PLL_CTRL);

	dev_dbg(clk->dev, "current configurarion: %#x\n", val);
	dev_dbg(clk->dev, "current configuration: %#x\n", val);

	/* Check if PLL is disabled */
	if (val & CGU_PLL_CTRL_PD)
+2 −4
Original line number Diff line number Diff line
@@ -134,11 +134,9 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name,
	}

	/* allocate the mux */
	mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
	if (!mux) {
		pr_err("%s: could not allocate mux clk\n", __func__);
	mux = kzalloc(sizeof(*mux), GFP_KERNEL);
	if (!mux)
		return ERR_PTR(-ENOMEM);
	}

	init.name = name;
	if (clk_mux_flags & CLK_MUX_READ_ONLY)
+40 −44
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@
#define U300_SYSCON_S1CCR_SEL_APP_FSM_CLK			(0x2 << 1)
#define U300_SYSCON_S1CCR_SEL_RTC_CLK				(0x4 << 1)
#define U300_SYSCON_S1CCR_SEL_APP_PLL208_CLK			(0x6 << 1)
/* SYS_2_CLK_CONTROL third clock contol 16 bit (R/W) */
/* SYS_2_CLK_CONTROL third clock control 16 bit (R/W) */
#define U300_SYSCON_S2CCR					(0x128)
#define U300_SYSCON_S2CCR_FIELD_MASK				(0xC3FF)
#define U300_SYSCON_S2CCR_CLK_STEAL				(0x8000)
@@ -378,7 +378,7 @@
 *  +- ISP Image Signal Processor (U335 only)
 *  +- CDS (U335 only)
 *  +- DMA Direct Memory Access Controller
 *  +- AAIF APP/ACC Inteface (Mobile Scalable Link, MSL)
 *  +- AAIF APP/ACC Interface (Mobile Scalable Link, MSL)
 *  +- APEX
 *  +- VIDEO_ENC AVE2/3 Video Encoder
 *  +- XGAM Graphics Accelerator Controller
@@ -702,12 +702,10 @@ syscon_clk_register(struct device *dev, const char *name,
	struct clk_init_data init;
	int ret;

	sclk = kzalloc(sizeof(struct clk_syscon), GFP_KERNEL);
	if (!sclk) {
		pr_err("could not allocate syscon clock %s\n",
			name);
	sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
	if (!sclk)
		return ERR_PTR(-ENOMEM);
	}

	init.name = name;
	init.ops = &syscon_clk_ops;
	init.flags = flags;
@@ -1123,12 +1121,10 @@ mclk_clk_register(struct device *dev, const char *name,
	struct clk_init_data init;
	int ret;

	mclk = kzalloc(sizeof(struct clk_mclk), GFP_KERNEL);
	if (!mclk) {
		pr_err("could not allocate MMC/SD clock %s\n",
		       name);
	mclk = kzalloc(sizeof(*mclk), GFP_KERNEL);
	if (!mclk)
		return ERR_PTR(-ENOMEM);
	}

	init.name = "mclk";
	init.ops = &mclk_ops;
	init.flags = 0;
Loading