The patch titled vesafb: use platform_driver_probe() instead of platform_driver_register() has been added to the -mm tree. Its filename is vesafb-use-platform_driver_probe-instead-of-platform_driver_register.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: vesafb: use platform_driver_probe() instead of platform_driver_register() From: "Jan Beulich" <JBeulich@xxxxxxxxxx> Commit c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers: move probe to .devinit.text in drivers/video") introduced a huge amount of section mismatch warnings in vesafb code. Rather than converting all of the annotations, do the obvious and revert the __init -> __devinit change, and use the recommended (in that patch) alternative to calling platform_driver_register(): vesafb depends on information obtained from by kernel at boot time, cannot be a module, and no post-boot devices can ever show up. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/vesafb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff -puN drivers/video/vesafb.c~vesafb-use-platform_driver_probe-instead-of-platform_driver_register drivers/video/vesafb.c --- a/drivers/video/vesafb.c~vesafb-use-platform_driver_probe-instead-of-platform_driver_register +++ a/drivers/video/vesafb.c @@ -225,7 +225,7 @@ static int __init vesafb_setup(char *opt return 0; } -static int __devinit vesafb_probe(struct platform_device *dev) +static int __init vesafb_probe(struct platform_device *dev) { struct fb_info *info; int i, err; @@ -476,7 +476,6 @@ err: } static struct platform_driver vesafb_driver = { - .probe = vesafb_probe, .driver = { .name = "vesafb", }, @@ -492,20 +491,21 @@ static int __init vesafb_init(void) /* ignore error return of fb_get_options */ fb_get_options("vesafb", &option); vesafb_setup(option); - ret = platform_driver_register(&vesafb_driver); + vesafb_device = platform_device_alloc("vesafb", 0); + if (!vesafb_device) + return -ENOMEM; + + ret = platform_device_add(vesafb_device); if (!ret) { - vesafb_device = platform_device_alloc("vesafb", 0); + ret = platform_driver_probe(&vesafb_driver, vesafb_probe); + if (ret) + platform_device_del(vesafb_device); + } - if (vesafb_device) - ret = platform_device_add(vesafb_device); - else - ret = -ENOMEM; - - if (ret) { - platform_device_put(vesafb_device); - platform_driver_unregister(&vesafb_driver); - } + if (ret) { + platform_device_put(vesafb_device); + vesafb_device = NULL; } return ret; _ Patches currently in -mm which might be from JBeulich@xxxxxxxxxx are vesafb-use-platform_driver_probe-instead-of-platform_driver_register.patch drivers-base-cpuc-fix-the-output-from-sys-devices-system-cpu-offline.patch x86-nosmp-command-line-option-should-force-the-system-into-up-mode.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html