From: Paul Mundt Date: Thu, 13 May 2010 09:02:28 +0000 (+0900) Subject: Merge branch 'sh/driver-core' X-Git-Tag: v2.6.35-rc1~504^2~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=b9e3fc29c08a6dcbe19606cfba19c1fcc0551ed7;hp=-c Merge branch 'sh/driver-core' --- b9e3fc29c08a6dcbe19606cfba19c1fcc0551ed7 diff --combined drivers/base/platform.c index d10230adeb36,ef51b0083840..81865ee2eff3 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@@ -362,8 -362,6 +362,8 @@@ EXPORT_SYMBOL_GPL(platform_device_unreg * enumeration tasks, they don't fully conform to the Linux driver model. * In particular, when such drivers are built as modules, they can't be * "hotplugged". + * + * Returns &struct platform_device pointer on success, or ERR_PTR() on error. */ struct platform_device *platform_device_register_simple(const char *name, int id, @@@ -410,8 -408,6 +410,8 @@@ EXPORT_SYMBOL_GPL(platform_device_regis * allocated for the device allows drivers using such devices to be * unloaded without waiting for the last reference to the device to be * dropped. + * + * Returns &struct platform_device pointer on success, or ERR_PTR() on error. */ struct platform_device *platform_device_register_data( struct device *parent, @@@ -563,8 -559,6 +563,8 @@@ EXPORT_SYMBOL_GPL(platform_driver_probe * * Use this in legacy-style modules that probe hardware directly and * register a single platform device and corresponding platform driver. + * + * Returns &struct platform_device pointer on success, or ERR_PTR() on error. */ struct platform_device * __init_or_module platform_create_bundle( struct platform_driver *driver, @@@ -1058,11 -1052,9 +1058,11 @@@ static __initdata LIST_HEAD(early_platf static __initdata LIST_HEAD(early_platform_device_list); /** - * early_platform_driver_register + * early_platform_driver_register - register early platform driver * @epdrv: early_platform driver structure * @buf: string passed from early_param() + * + * Helper function for early_platform_init() / early_platform_init_buffer() */ int __init early_platform_driver_register(struct early_platform_driver *epdrv, char *buf) @@@ -1114,12 -1106,9 +1114,12 @@@ } /** - * early_platform_add_devices - add a numbers of early platform devices + * early_platform_add_devices - adds a number of early platform devices * @devs: array of early platform devices to add * @num: number of early platform devices in array + * + * Used by early architecture code to register early platform devices and + * their platform data. */ void __init early_platform_add_devices(struct platform_device **devs, int num) { @@@ -1139,12 -1128,8 +1139,12 @@@ } /** - * early_platform_driver_register_all + * early_platform_driver_register_all - register early platform drivers * @class_str: string to identify early platform driver class + * + * Used by architecture code to register all early platform drivers + * for a certain class. If omitted then only early platform drivers + * with matching kernel command line class parameters will be registered. */ void __init early_platform_driver_register_all(char *class_str) { @@@ -1166,7 -1151,7 +1166,7 @@@ } /** - * early_platform_match + * early_platform_match - find early platform device matching driver * @epdrv: early platform driver structure * @id: id to match against */ @@@ -1184,7 -1169,7 +1184,7 @@@ early_platform_match(struct early_platf } /** - * early_platform_left + * early_platform_left - check if early platform driver has matching devices * @epdrv: early platform driver structure * @id: return true if id or above exists */ @@@ -1202,7 -1187,7 +1202,7 @@@ static __init int early_platform_left( } /** - * early_platform_driver_probe_id + * early_platform_driver_probe_id - probe drivers matching class_str and id * @class_str: string to identify early platform driver class * @id: id to match against * @nr_probe: number of platform devices to successfully probe before exiting @@@ -1259,7 -1244,7 +1259,7 @@@ static int __init early_platform_driver * dev_name() and others to be used before the * rest of the driver core is initialized. */ - if (!match->dev.init_name) { + if (!match->dev.init_name && slab_is_available()) { if (match->id != -1) match->dev.init_name = kasprintf(GFP_KERNEL, "%s.%d", @@@ -1292,14 -1277,10 +1292,14 @@@ } /** - * early_platform_driver_probe + * early_platform_driver_probe - probe a class of registered drivers * @class_str: string to identify early platform driver class * @nr_probe: number of platform devices to successfully probe before exiting * @user_only: only probe user specified early platform devices + * + * Used by architecture code to probe registered early platform drivers + * within a certain class. For probe to happen a registered early platform + * device matching a registered early platform driver is needed. */ int __init early_platform_driver_probe(char *class_str, int nr_probe,