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

Commit 5ac98553 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Lee Jones
Browse files

mfd: Constify struct mfd_cell where possible



As of commit 03e361b2 ("mfd: Stop setting
refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
mfd_add_devices() is "const" again. Hence make all cell data passed to
mfd_add_devices() const where possible.

Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 2977dc92
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1017,7 +1017,7 @@ static struct resource ab8500_temp_resources[] = {
	},
};

static struct mfd_cell ab8500_bm_devs[] = {
static const struct mfd_cell ab8500_bm_devs[] = {
	{
		.name = "ab8500-charger",
		.of_compatible = "stericsson,ab8500-charger",
@@ -1052,7 +1052,7 @@ static struct mfd_cell ab8500_bm_devs[] = {
	},
};

static struct mfd_cell ab8500_devs[] = {
static const struct mfd_cell ab8500_devs[] = {
#ifdef CONFIG_DEBUG_FS
	{
		.name = "ab8500-debug",
@@ -1143,7 +1143,7 @@ static struct mfd_cell ab8500_devs[] = {
	},
};

static struct mfd_cell ab9540_devs[] = {
static const struct mfd_cell ab9540_devs[] = {
#ifdef CONFIG_DEBUG_FS
	{
		.name = "ab8500-debug",
@@ -1214,7 +1214,7 @@ static struct mfd_cell ab9540_devs[] = {
};

/* Device list for ab8505  */
static struct mfd_cell ab8505_devs[] = {
static const struct mfd_cell ab8505_devs[] = {
#ifdef CONFIG_DEBUG_FS
	{
		.name = "ab8500-debug",
@@ -1275,7 +1275,7 @@ static struct mfd_cell ab8505_devs[] = {
	},
};

static struct mfd_cell ab8540_devs[] = {
static const struct mfd_cell ab8540_devs[] = {
#ifdef CONFIG_DEBUG_FS
	{
		.name = "ab8500-debug",
@@ -1339,7 +1339,7 @@ static struct mfd_cell ab8540_devs[] = {
	},
};

static struct mfd_cell ab8540_cut1_devs[] = {
static const struct mfd_cell ab8540_cut1_devs[] = {
	{
		.name = "ab8500-rtc",
		.of_compatible = "stericsson,ab8500-rtc",
@@ -1348,7 +1348,7 @@ static struct mfd_cell ab8540_cut1_devs[] = {
	},
};

static struct mfd_cell ab8540_cut2_devs[] = {
static const struct mfd_cell ab8540_cut2_devs[] = {
	{
		.name = "ab8540-rtc",
		.of_compatible = "stericsson,ab8540-rtc",
+4 −4
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ static inline int arizona_of_get_core_pdata(struct arizona *arizona)
}
#endif

static struct mfd_cell early_devs[] = {
static const struct mfd_cell early_devs[] = {
	{ .name = "arizona-ldo1" },
};

@@ -577,7 +577,7 @@ static const char *wm5102_supplies[] = {
	"SPKVDDR",
};

static struct mfd_cell wm5102_devs[] = {
static const struct mfd_cell wm5102_devs[] = {
	{ .name = "arizona-micsupp" },
	{ .name = "arizona-extcon" },
	{ .name = "arizona-gpio" },
@@ -590,7 +590,7 @@ static struct mfd_cell wm5102_devs[] = {
	},
};

static struct mfd_cell wm5110_devs[] = {
static const struct mfd_cell wm5110_devs[] = {
	{ .name = "arizona-micsupp" },
	{ .name = "arizona-extcon" },
	{ .name = "arizona-gpio" },
@@ -609,7 +609,7 @@ static const char *wm8997_supplies[] = {
	"SPKVDD",
};

static struct mfd_cell wm8997_devs[] = {
static const struct mfd_cell wm8997_devs[] = {
	{ .name = "arizona-micsupp" },
	{ .name = "arizona-extcon" },
	{ .name = "arizona-gpio" },
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static const struct resource as3722_adc_resource[] = {
	},
};

static struct mfd_cell as3722_devs[] = {
static const struct mfd_cell as3722_devs[] = {
	{
		.name = "as3722-pinctrl",
	},
+2 −2
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ static int ds1wm_disable(struct platform_device *pdev)
	return 0;
}

static struct mfd_cell asic3_cell_ds1wm = {
static const struct mfd_cell asic3_cell_ds1wm = {
	.name          = "ds1wm",
	.enable        = ds1wm_enable,
	.disable       = ds1wm_disable,
@@ -797,7 +797,7 @@ static int asic3_mmc_disable(struct platform_device *pdev)
	return 0;
}

static struct mfd_cell asic3_cell_mmc = {
static const struct mfd_cell asic3_cell_mmc = {
	.name          = "tmio-mmc",
	.enable        = asic3_mmc_enable,
	.disable       = asic3_mmc_disable,
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static irqreturn_t ec_irq_thread(int irq, void *data)
	return IRQ_HANDLED;
}

static struct mfd_cell cros_devs[] = {
static const struct mfd_cell cros_devs[] = {
	{
		.name = "cros-ec-keyb",
		.id = 1,
Loading