Fix platform_notify functions marked __init
PATCH 1/1 Fix platform_notify functions marked __init
While adding USB support to an MV64360 based board this week, I discovered that all MV64x60 boards in the kernel have platform_notify functions marked with __init. This causes an oops if a device is added after boot.
The patch below removes the __init markers. I do not have all these boards to test on, but the change seems very unlikely to break anything else.
arch/ppc/platforms/cpci690.c +1 -1
@@ -290,7 +290,7 @@ cpci690_fixup_mpsc_pdata(struct platform pdata->brg_clk_freq =cpci690_get_bus_freq (); } -static int __init +static int cpci690_platform_notify (struct device *dev) { static struct {
arch/ppc/platforms/ev64260.c +1 -1
@@ -416,7 +416,7 @@ ev64260_fixup_mpsc_pdata(struct platformreturn ; } -static int __init +static int ev64260_platform_notify (struct device *dev) { static struct {
arch/ppc/platforms/ev64360.c +1 -1
@@ -300,7 +300,7 @@ ev64360_fixup_eth_pdata(struct platform_ }#endif -static int __init +static int ev64360_platform_notify (struct device *dev) { static struct {
arch/ppc/platforms/hdpu.c +1 -1
@@ -354,7 +354,7 @@ static void __init hdpu_fixup_cpustate_p }#endif -static int __init hdpu_platform_notify (struct device *dev) +static int hdpu_platform_notify (struct device *dev) { static struct { char *bus_id;
arch/ppc/platforms/katana.c +1 -1
@@ -598,7 +598,7 @@ katana_fixup_mv64xxx_pdata(struct platfo }#endif -static int __init +static int katana_platform_notify (struct device *dev) { static struct {
arch/ppc/platforms/radstone_ppc7d.c +1 -1
@@ -712,7 +712,7 @@ ppc7d_fixup_i2c_pdata(struct platform_de }#endif -static int __init ppc7d_platform_notify (struct device *dev) +static int ppc7d_platform_notify (struct device *dev) { static struct { char *bus_id;
Signature · 1 line
Adrian Cox <[email protected]>
Quoted 8 lines · Adrian Cox
While adding USB support to an MV64360 based board this week, I discovered that all MV64x60 boards in the kernel have
platform_notifyfunctions marked with__init. This causes an oops if a device is added after boot.The patch below removes the
__initmarkers. I do not have all these boards to test on, but the change seems very unlikely to break anything else.
Arg... I realized this a long time ago and fixed it in my tree. Somewhere along the line, I dropped it, I guess.
Thanks for the patch Adrian.
Mark