Messages in this thread Patch in this message | | | Date | Tue, 5 Jul 2005 23:04:53 +0200 (CEST) | Subject | missing "platform_remove_devices" in kernel 2.6 | From | "Pawel Kolodziejski" <> |
| |
Hi,
I attached patch for kernel 2.6.12 which add missing "platform_remove_devices" function in "drivers/base/platform.c" file.
Pawel Kolodziejski
diff -u -r -N -P old/kernel26/drivers/base/platform.c new/kernel26/drivers/base/platform.c --- old/kernel26/drivers/base/platform.c 2005-07-01 06:48:46.000000000 +0200 +++ new/kernel26/drivers/base/platform.c 2005-07-01 07:33:44.000000000 +0200 @@ -114,6 +114,22 @@ } /** + * platform_remove_devices - remove a numbers of platform devices + * @devs: array of platform devices to remove + * @num: number of platform devices in array + */ +int platform_remove_devices(struct platform_device **devs, int num) +{ + int i; + + for (i = 0; i < num; i++) { + platform_device_unregister(devs[i]); + } + + return 0; +} + +/** * platform_device_register - add a platform-level device * @pdev: platform device we're adding * @@ -347,6 +363,7 @@ EXPORT_SYMBOL_GPL(platform_bus); EXPORT_SYMBOL_GPL(platform_bus_type); EXPORT_SYMBOL_GPL(platform_add_devices); +EXPORT_SYMBOL_GPL(platform_remove_devices); EXPORT_SYMBOL_GPL(platform_device_register); EXPORT_SYMBOL_GPL(platform_device_register_simple); EXPORT_SYMBOL_GPL(platform_device_unregister); | |