V4L/DVB (13784): [Mantis] Use PCI API instead of hardcoded length
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
f5701b6776
commit
ff63ac5670
@@ -169,7 +169,10 @@ static int __devinit mantis_pci_probe(struct pci_dev *pdev,
|
|||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mantis->mantis_mmio = ioremap(mantis->mantis_addr, 0x1000)) == NULL) {
|
mantis->mantis_mmio = ioremap(pci_resource_start(pdev, 0),
|
||||||
|
pci_resource_len(pdev, 0));
|
||||||
|
|
||||||
|
if (!mantis->mantis_mmio) {
|
||||||
dprintk(verbose, MANTIS_ERROR, 1, "IO remap failed");
|
dprintk(verbose, MANTIS_ERROR, 1, "IO remap failed");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err1;
|
goto err1;
|
||||||
|
Reference in New Issue
Block a user