staging: agnx, remove memlens from probe
Pass 0 to pci_iomap instead. It will cope with that per se. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9c2a6105bf
commit
a505fe716d
@@ -455,7 +455,6 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
|
|||||||
{
|
{
|
||||||
struct ieee80211_hw *dev;
|
struct ieee80211_hw *dev;
|
||||||
struct agnx_priv *priv;
|
struct agnx_priv *priv;
|
||||||
u32 mem_len0, mem_len1;
|
|
||||||
int err;
|
int err;
|
||||||
DECLARE_MAC_BUF(mac);
|
DECLARE_MAC_BUF(mac);
|
||||||
|
|
||||||
@@ -465,9 +464,6 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_len0 = pci_resource_len(pdev, 0);
|
|
||||||
mem_len1 = pci_resource_len(pdev, 1);
|
|
||||||
|
|
||||||
err = pci_request_regions(pdev, "agnx-pci");
|
err = pci_request_regions(pdev, "agnx-pci");
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "can't reserve PCI resources\n");
|
dev_err(&pdev->dev, "can't reserve PCI resources\n");
|
||||||
@@ -496,13 +492,13 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
|
|||||||
spin_lock_init(&priv->lock);
|
spin_lock_init(&priv->lock);
|
||||||
priv->init_status = AGNX_UNINIT;
|
priv->init_status = AGNX_UNINIT;
|
||||||
|
|
||||||
priv->ctl = pci_iomap(pdev, 0, mem_len0);
|
priv->ctl = pci_iomap(pdev, 0, 0);
|
||||||
/* dev_dbg(&pdev->dev, "MEM1 mapped address is 0x%p\n", priv->ctl); */
|
/* dev_dbg(&pdev->dev, "MEM1 mapped address is 0x%p\n", priv->ctl); */
|
||||||
if (!priv->ctl) {
|
if (!priv->ctl) {
|
||||||
dev_err(&pdev->dev, "can't map device memory\n");
|
dev_err(&pdev->dev, "can't map device memory\n");
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
}
|
}
|
||||||
priv->data = pci_iomap(pdev, 1, mem_len1);
|
priv->data = pci_iomap(pdev, 1, 0);
|
||||||
if (!priv->data) {
|
if (!priv->data) {
|
||||||
dev_err(&pdev->dev, "can't map device memory\n");
|
dev_err(&pdev->dev, "can't map device memory\n");
|
||||||
goto err_iounmap2;
|
goto err_iounmap2;
|
||||||
|
Reference in New Issue
Block a user