Revert "pcmcia: Use resource_size function on resource object"

This reverts commit f50e7b3305.
This commit is contained in:
Ksawlii 2024-11-24 00:23:42 +01:00
parent 7a8e8ba02b
commit d0f250e55f

View file

@ -636,11 +636,11 @@ static int yenta_search_one_res(struct resource *root, struct resource *res,
start = PCIBIOS_MIN_CARDBUS_IO;
end = ~0U;
} else {
unsigned long avail = resource_size(root);
unsigned long avail = root->end - root->start;
int i;
size = BRIDGE_MEM_MAX;
if (size > (avail - 1) / 8) {
size = avail / 8;
if (size > avail/8) {
size = (avail+1)/8;
/* round size down to next power of 2 */
i = 0;
while ((size /= 2) != 0)