/* platform_get_resource - get a resource for a device @dev: platform device @type: resource type @num: resource index  */
struct resource* platform_get_resource(struct platform_device *dev, unsigned int type, unsigned int num)
/* platform_get_resource - get a resource for a device @dev: platform device @type: resource type @num: resource index  */
struct resource* platform_get_resource(struct platform_device *dev, unsigned int type, unsigned int num)
{
	int i;
	for (i = 0; i < dev->num_resources; i++) {
		struct resource *r = &dev->resource[i];
		if (type == resource_type(r) && num-- == 0)
			return r;
	}
	return NULL;
}