]> git.baikalelectronics.ru Git - kernel.git/commit
Driver core: platform_driver_probe(), can save codespace
authorDavid Brownell <david-b@pacbell.net>
Fri, 17 Nov 2006 07:28:47 +0000 (23:28 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:52:02 +0000 (14:52 -0800)
commitbd568309cbbf9fec20aaefe51fd3540b2f4f5071
treec386f3aa4af94bb7d24ddb18b51f90bcb9a4d599
parentb0ddb47a1ad6b1497275700c986e53bcf643e7ec
Driver core: platform_driver_probe(), can save codespace

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: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/platform.c
include/linux/platform_device.h