• David Brownell's avatar
    Driver core: platform_driver_probe(), can save codespace · c67334fb
    David Brownell authored
    This defines a new platform_driver_probe() method allowing the driver's
    probe() method, and its support code+data, to safely live in __init
    sections for typical system configurations.
    
    Many system-on-chip processors could benefit from this API, to the tune
    of recovering hundreds to thousands of bytes per driver.  That's memory
    which is currently wasted holding code which can never be called after
    system startup, yet can not be removed.   It can't be removed because of
    the linkage requirement that pointers to init section code (like, ideally,
    probe support) must not live in other sections (like driver method tables)
    after those pointers would be invalid.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    c67334fb
platform.c 16.4 KB