Commit 7425f246 authored by Michał Mirosław's avatar Michał Mirosław Committed by Stephen Boyd
Browse files

clk: at91: optimize pmc data allocation



Alloc whole data structure in one block. This makes the code shorter,
more efficient and easier to extend in following patch.

Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lkml.kernel.org/r/fc6f6d67b8cee0beace4a9d9cca7431e5efa769d.1588630999.git.mirq-linux@rere.qmqm.pl


Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent e218325f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
	return;

err_free:
	pmc_data_free(at91rm9200_pmc);
	kfree(at91rm9200_pmc);
}
/*
 * While the TCB can be used as the clocksource, the system timer is most likely
+1 −1
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
	return;

err_free:
	pmc_data_free(at91sam9260_pmc);
	kfree(at91sam9260_pmc);
}

static void __init at91sam9260_pmc_setup(struct device_node *np)
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
	return;

err_free:
	pmc_data_free(at91sam9g45_pmc);
	kfree(at91sam9g45_pmc);
}
/*
 * The TCB is used as the clocksource so its clock is needed early. This means
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
	return;

err_free:
	pmc_data_free(at91sam9n12_pmc);
	kfree(at91sam9n12_pmc);
}
/*
 * The TCB is used as the clocksource so its clock is needed early. This means
+1 −1
Original line number Diff line number Diff line
@@ -166,6 +166,6 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
	return;

err_free:
	pmc_data_free(at91sam9rl_pmc);
	kfree(at91sam9rl_pmc);
}
CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
Loading