Re: [PATCH 5/5] drivers: mfd: Fix resource request for [mem 0x00000000]

From: Aaron Sierra
Date: Thu Nov 08 2012 - 12:54:21 EST


> The older southbridges supported by the lpc_ich driver do not
> provide memory-mapped space of the root complex. The driver
> correctly avoids computing the iomem address in this case, yet
> submits a zeroed resource request anyway (via mfd_add_devices()).
>
> Remove the iomem resource from the resource array submitted to the
> mfd core for the older southbridges.
>

Peter, thanks for catching this.

> + } else {
> + /* So don't register iomem for TCO ver 1 */
> + --lpc_ich_cells[LPC_WDT].num_resources;

My only complaint is that pre-decrementing num_resources isn't
necessary and doesn't match the other cases where num_resources is
decremented (post-decremented), like here:

if (!base_addr) {
dev_err(&dev->dev, "I/O space for ACPI uninitialized\n");
lpc_ich_cells[LPC_GPIO].num_resources--;
goto gpe0_done;
}

-Aaron
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/