/* Note that this function will also release all memory- and port-based resources owned by the device (@dev->resource). This function must  */
void platform_device_del(struct platform_device *pdev)
/* Note that this function will also release all memory- and port-based resources owned by the device (@dev->resource). This function must  */
void platform_device_del(struct platform_device *pdev)
{
	int i;
	if (pdev) {
		device_del(&pdev->dev);
		for (i = 0; i < pdev->num_resources; i++) {
			struct resource *r = &pdev->resource[i];
			unsigned long type = resource_type(r);
			if (type == IORESOURCE_MEM || type == IORESOURCE_IO)
				release_resource(r);
		}
	}
}