diff options
Diffstat (limited to 'drivers/ata/pata_platform.c')
-rw-r--r-- | drivers/ata/pata_platform.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index d8d743af3225..3f6ebc6c665a 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c | |||
@@ -151,14 +151,14 @@ int __devinit __pata_platform_probe(struct device *dev, | |||
151 | */ | 151 | */ |
152 | if (mmio) { | 152 | if (mmio) { |
153 | ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start, | 153 | ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start, |
154 | io_res->end - io_res->start + 1); | 154 | resource_size(io_res)); |
155 | ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start, | 155 | ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start, |
156 | ctl_res->end - ctl_res->start + 1); | 156 | resource_size(ctl_res)); |
157 | } else { | 157 | } else { |
158 | ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start, | 158 | ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start, |
159 | io_res->end - io_res->start + 1); | 159 | resource_size(io_res)); |
160 | ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start, | 160 | ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start, |
161 | ctl_res->end - ctl_res->start + 1); | 161 | resource_size(ctl_res)); |
162 | } | 162 | } |
163 | if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) { | 163 | if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) { |
164 | dev_err(dev, "failed to map IO/CTL base\n"); | 164 | dev_err(dev, "failed to map IO/CTL base\n"); |