diff options
author | Jani Nikula <ext-jani.1.nikula@nokia.com> | 2010-03-11 11:11:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-19 10:12:21 -0400 |
commit | f0eae0ed3b7d4182a6b4dd03540a738518ea3163 (patch) | |
tree | f7432690b4df967f10643fa82f05f57aecba142f /drivers | |
parent | 178a5b35b2777346206d4b577b36d10061732f8c (diff) |
driver-core: document ERR_PTR() return values
A number of functions in the driver core return ERR_PTR() values on
error. Document this in the kernel-doc of the functions.
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/class.c | 2 | ||||
-rw-r--r-- | drivers/base/core.c | 6 | ||||
-rw-r--r-- | drivers/base/platform.c | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 0147f476b8a9..9c6a0d6408e7 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -219,6 +219,8 @@ static void class_create_release(struct class *cls) | |||
219 | * This is used to create a struct class pointer that can then be used | 219 | * This is used to create a struct class pointer that can then be used |
220 | * in calls to device_create(). | 220 | * in calls to device_create(). |
221 | * | 221 | * |
222 | * Returns &struct class pointer on success, or ERR_PTR() on error. | ||
223 | * | ||
222 | * Note, the pointer created here is to be destroyed when finished by | 224 | * Note, the pointer created here is to be destroyed when finished by |
223 | * making a call to class_destroy(). | 225 | * making a call to class_destroy(). |
224 | */ | 226 | */ |
diff --git a/drivers/base/core.c b/drivers/base/core.c index ef55df34ddd0..b56a0ba31d4a 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1345,6 +1345,8 @@ static void root_device_release(struct device *dev) | |||
1345 | * 'module' symlink which points to the @owner directory | 1345 | * 'module' symlink which points to the @owner directory |
1346 | * in sysfs. | 1346 | * in sysfs. |
1347 | * | 1347 | * |
1348 | * Returns &struct device pointer on success, or ERR_PTR() on error. | ||
1349 | * | ||
1348 | * Note: You probably want to use root_device_register(). | 1350 | * Note: You probably want to use root_device_register(). |
1349 | */ | 1351 | */ |
1350 | struct device *__root_device_register(const char *name, struct module *owner) | 1352 | struct device *__root_device_register(const char *name, struct module *owner) |
@@ -1432,6 +1434,8 @@ static void device_create_release(struct device *dev) | |||
1432 | * Any further sysfs files that might be required can be created using this | 1434 | * Any further sysfs files that might be required can be created using this |
1433 | * pointer. | 1435 | * pointer. |
1434 | * | 1436 | * |
1437 | * Returns &struct device pointer on success, or ERR_PTR() on error. | ||
1438 | * | ||
1435 | * Note: the struct class passed to this function must have previously | 1439 | * Note: the struct class passed to this function must have previously |
1436 | * been created with a call to class_create(). | 1440 | * been created with a call to class_create(). |
1437 | */ | 1441 | */ |
@@ -1492,6 +1496,8 @@ EXPORT_SYMBOL_GPL(device_create_vargs); | |||
1492 | * Any further sysfs files that might be required can be created using this | 1496 | * Any further sysfs files that might be required can be created using this |
1493 | * pointer. | 1497 | * pointer. |
1494 | * | 1498 | * |
1499 | * Returns &struct device pointer on success, or ERR_PTR() on error. | ||
1500 | * | ||
1495 | * Note: the struct class passed to this function must have previously | 1501 | * Note: the struct class passed to this function must have previously |
1496 | * been created with a call to class_create(). | 1502 | * been created with a call to class_create(). |
1497 | */ | 1503 | */ |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f6bcf22e6bd1..4b4b565c835f 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -362,6 +362,8 @@ EXPORT_SYMBOL_GPL(platform_device_unregister); | |||
362 | * enumeration tasks, they don't fully conform to the Linux driver model. | 362 | * enumeration tasks, they don't fully conform to the Linux driver model. |
363 | * In particular, when such drivers are built as modules, they can't be | 363 | * In particular, when such drivers are built as modules, they can't be |
364 | * "hotplugged". | 364 | * "hotplugged". |
365 | * | ||
366 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
365 | */ | 367 | */ |
366 | struct platform_device *platform_device_register_simple(const char *name, | 368 | struct platform_device *platform_device_register_simple(const char *name, |
367 | int id, | 369 | int id, |
@@ -408,6 +410,8 @@ EXPORT_SYMBOL_GPL(platform_device_register_simple); | |||
408 | * allocated for the device allows drivers using such devices to be | 410 | * allocated for the device allows drivers using such devices to be |
409 | * unloaded without waiting for the last reference to the device to be | 411 | * unloaded without waiting for the last reference to the device to be |
410 | * dropped. | 412 | * dropped. |
413 | * | ||
414 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
411 | */ | 415 | */ |
412 | struct platform_device *platform_device_register_data( | 416 | struct platform_device *platform_device_register_data( |
413 | struct device *parent, | 417 | struct device *parent, |
@@ -559,6 +563,8 @@ EXPORT_SYMBOL_GPL(platform_driver_probe); | |||
559 | * | 563 | * |
560 | * Use this in legacy-style modules that probe hardware directly and | 564 | * Use this in legacy-style modules that probe hardware directly and |
561 | * register a single platform device and corresponding platform driver. | 565 | * register a single platform device and corresponding platform driver. |
566 | * | ||
567 | * Returns &struct platform_device pointer on success, or ERR_PTR() on error. | ||
562 | */ | 568 | */ |
563 | struct platform_device * __init_or_module platform_create_bundle( | 569 | struct platform_device * __init_or_module platform_create_bundle( |
564 | struct platform_driver *driver, | 570 | struct platform_driver *driver, |