Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: arizona: Update device ordering to allow clean driver removal

Since this commit:

commit b9a8a271c38f ("mfd: make mfd_remove_devices() iterate in reverse
order")

The order in which the MFD children remove has been reversed, as our
driver contains some dependencies between the devices we need to make
some changes to ensure the driver unloads cleanly.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Charles Keepax and committed by
Lee Jones
f83c218c 1387ff53

+5 -5
+5 -5
drivers/mfd/arizona-core.c
··· 908 908 909 909 static const struct mfd_cell wm5102_devs[] = { 910 910 { .name = "arizona-micsupp" }, 911 + { .name = "arizona-gpio" }, 911 912 { 912 913 .name = "arizona-extcon", 913 914 .parent_supplies = wm5102_supplies, 914 915 .num_parent_supplies = 1, /* We only need MICVDD */ 915 916 }, 916 - { .name = "arizona-gpio" }, 917 917 { .name = "arizona-haptics" }, 918 918 { .name = "arizona-pwm" }, 919 919 { ··· 925 925 926 926 static const struct mfd_cell wm5110_devs[] = { 927 927 { .name = "arizona-micsupp" }, 928 + { .name = "arizona-gpio" }, 928 929 { 929 930 .name = "arizona-extcon", 930 931 .parent_supplies = wm5102_supplies, 931 932 .num_parent_supplies = 1, /* We only need MICVDD */ 932 933 }, 933 - { .name = "arizona-gpio" }, 934 934 { .name = "arizona-haptics" }, 935 935 { .name = "arizona-pwm" }, 936 936 { ··· 966 966 967 967 static const struct mfd_cell wm8997_devs[] = { 968 968 { .name = "arizona-micsupp" }, 969 + { .name = "arizona-gpio" }, 969 970 { 970 971 .name = "arizona-extcon", 971 972 .parent_supplies = wm8997_supplies, 972 973 .num_parent_supplies = 1, /* We only need MICVDD */ 973 974 }, 974 - { .name = "arizona-gpio" }, 975 975 { .name = "arizona-haptics" }, 976 976 { .name = "arizona-pwm" }, 977 977 { ··· 982 982 }; 983 983 984 984 static const struct mfd_cell wm8998_devs[] = { 985 + { .name = "arizona-micsupp" }, 986 + { .name = "arizona-gpio" }, 985 987 { 986 988 .name = "arizona-extcon", 987 989 .parent_supplies = wm5102_supplies, 988 990 .num_parent_supplies = 1, /* We only need MICVDD */ 989 991 }, 990 - { .name = "arizona-gpio" }, 991 992 { .name = "arizona-haptics" }, 992 993 { .name = "arizona-pwm" }, 993 994 { ··· 996 995 .parent_supplies = wm5102_supplies, 997 996 .num_parent_supplies = ARRAY_SIZE(wm5102_supplies), 998 997 }, 999 - { .name = "arizona-micsupp" }, 1000 998 }; 1001 999 1002 1000 int arizona_dev_init(struct arizona *arizona)