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

Commit ce6d73c9 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Michael Ellerman
Browse files

powerpc: make of_device_ids const



of_device_ids (i.e. compatible strings and the respective data) are not
supposed to change at runtime. All functions working with of_device_ids
provided by <linux/of.h> work with const of_device_ids. This allows to
mark all struct of_device_id const, too.

While touching these line also put the __init annotation at the right
position where necessary.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d4fe0965
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static struct device ibmebus_bus_device = { /* fake "parent" device */
struct bus_type ibmebus_bus_type;

/* These devices will automatically be added to the bus during init */
static struct of_device_id __initdata ibmebus_matches[] = {
static const struct of_device_id ibmebus_matches[] __initconst = {
	{ .compatible = "IBM,lhca" },
	{ .compatible = "IBM,lhea" },
	{},
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static struct legacy_serial_info {
	phys_addr_t			taddr;
} legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS];

static struct of_device_id legacy_serial_parents[] __initdata = {
static const struct of_device_id legacy_serial_parents[] __initconst = {
	{.type = "soc",},
	{.type = "tsi-bridge",},
	{.type = "opb", },
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ static int of_pci_phb_probe(struct platform_device *dev)
	return 0;
}

static struct of_device_id of_pci_phb_ids[] = {
static const struct of_device_id of_pci_phb_ids[] = {
	{ .type = "pci", },
	{ .type = "pcix", },
	{ .type = "pcie", },
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ static void __iomem *bcsr_regs;
/* there's more, can't be bothered typing them tho */


static __initdata struct of_device_id ep405_of_bus[] = {
static const struct of_device_id ep405_of_bus[] __initconst = {
	{ .compatible = "ibm,plb3", },
	{ .compatible = "ibm,opb", },
	{ .compatible = "ibm,ebc", },
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include <linux/init.h>
#include <linux/of_platform.h>

static __initdata struct of_device_id ppc40x_of_bus[] = {
static const struct of_device_id ppc40x_of_bus[] __initconst = {
	{ .compatible = "ibm,plb3", },
	{ .compatible = "ibm,plb4", },
	{ .compatible = "ibm,opb", },
Loading