Example #1
0
static u32 my_find_pci_tolm(struct bus *bus, u32 tolm)
{
    struct resource *min;
    min = 0;
    search_bus_resources(bus, IORESOURCE_MEM, IORESOURCE_MEM, tolm_test, &min);
    if (min && tolm > min->base) {
        tolm = min->base;
    }
    return tolm;
}
Example #2
0
static struct device *largest_resource(struct bus *bus,
				       struct resource **result_res,
				       unsigned long type_mask,
				       unsigned long type)
{
	struct pick_largest_state state;

	state.last = *result_res;
	state.result_dev = NULL;
	state.result = NULL;
	state.seen_last = 0;

	search_bus_resources(bus, type_mask, type, pick_largest_resource,
			     &state);

	*result_res = state.result;
	return state.result_dev;
}