Prev: [PATCH 0/1] drivers: misc: pass pointer to misc device itself
Next: [PATCH] l4f00242t03: fix error handling in l4f00242t03_probe
From: Richard Röjfors on 3 May 2010 02:10 On 04/23/2010 08:25 PM, Anton Vorontsov wrote: > On Wed, Mar 17, 2010 at 07:02:52AM +0100, Richard Röjfors wrote: >> On 3/16/10 7:34 PM, Anton Vorontsov wrote: >>> Some hosts have an extended SDHCI iomem size, so the driver should >>> only print errors if the iomem size is less than 0x100. >> >> With this change you allow a bigger resource than we really need. >> I think you should also change request_mem_region and ioremap to only >> request and map the actual needed size. (0x100) > > Sorry for the delayed response. > > Why do you think that mapping more than "needed" is a bad thing? > Looking into the PCI driver, it just maps the whole PCI BAR (which > makes sense, since later SDHCI spec might easily introduce an > extended address space, so hardcoding 0x100 isn't very good). > > There is another case when mapping the whole SDHCI mem space > might be convenient: if the platform code will want to use > the ioremapped region inside the platform hooks. That's a good reason. Acked-by: Richard Röjfors <richard.rojfors(a)pelagicore.com> > > Thanks! > >>> Signed-off-by: Anton Vorontsov<avorontsov(a)ru.mvista.com> >>> --- >>> drivers/mmc/host/sdhci-pltfm.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c >>> index 217b911..b6ee0d7 100644 >>> --- a/drivers/mmc/host/sdhci-pltfm.c >>> +++ b/drivers/mmc/host/sdhci-pltfm.c >>> @@ -61,7 +61,7 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) >>> goto err; >>> } >>> >>> - if (resource_size(iomem) != 0x100) >>> + if (resource_size(iomem)< 0x100) >>> dev_err(&pdev->dev, "Invalid iomem size. You may " >>> "experience problems.\n"); >>> >> > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |