mfd: Fix sm501 requested region size
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Mar 2010 19:07:48 +0000 (20:07 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 12 Mar 2010 08:08:59 +0000 (09:08 +0100)
We should only request for the MFD used region, not the whole thing.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Tested-by: Paul Mundt <lethal@linux-sh.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
drivers/mfd/sm501.c

index dc9ea95c0561bde7fed4f46e6d9f6ec140e0dc85..497712fd13edde7ba425e874f33caa1f955cb56b 100644 (file)
@@ -1430,7 +1430,7 @@ static int __devinit sm501_plat_probe(struct platform_device *dev)
        }
 
        sm->regs_claim = request_mem_region(sm->io_res->start,
-                                           resource_size(sm->io_res), "sm501");
+                                           0x100, "sm501");
 
        if (sm->regs_claim == NULL) {
                dev_err(&dev->dev, "cannot claim registers\n");
@@ -1644,7 +1644,7 @@ static int __devinit sm501_pci_probe(struct pci_dev *dev,
        sm->mem_res = &dev->resource[0];
 
        sm->regs_claim = request_mem_region(sm->io_res->start,
-                                           resource_size(sm->io_res), "sm501");
+                                           0x100, "sm501");
        if (sm->regs_claim == NULL) {
                dev_err(&dev->dev, "cannot claim registers\n");
                err= -EBUSY;