diff options
author | Guillaume Clement <gclement@baobob.org> | 2014-07-22 22:08:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-22 15:02:08 -0700 |
commit | 1683440595ea33cc019fb8524b04319cf82bc6ac (patch) | |
tree | a21a5d5a642a74085206c268d87d7609c1625e2d /drivers/staging/vt6655/device_main.c | |
parent | c49d4b96ab6175fdcc3f858b0ef620f20ae16437 (diff) | |
download | op-kernel-dev-1683440595ea33cc019fb8524b04319cf82bc6ac.zip op-kernel-dev-1683440595ea33cc019fb8524b04319cf82bc6ac.tar.gz |
staging: vt6655: change type of PortOffset to void __iomem *
PortOffset was an unsigned long, but used as an pointer to io
memory. Sometimes it was not properly cast before use, which caused
many warning by sparse.
By updating its type to void __iomem *, and reflecting the changes
where it is needed, this removes most of those warnings.
Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 2327386..29ac1e9 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -891,9 +891,9 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) #endif - pDevice->PortOffset = (unsigned long)ioremap(pDevice->memaddr & PCI_BASE_ADDRESS_MEM_MASK, pDevice->io_size); + pDevice->PortOffset = ioremap(pDevice->memaddr & PCI_BASE_ADDRESS_MEM_MASK, pDevice->io_size); - if (pDevice->PortOffset == 0) { + if (pDevice->PortOffset == NULL) { printk(KERN_ERR DEVICE_NAME ": Failed to IO remapping ..\n"); device_free_info(pDevice); return -ENODEV; @@ -1079,7 +1079,7 @@ static void device_free_info(PSDevice pDevice) { unregister_netdev(dev); if (pDevice->PortOffset) - iounmap((void *)pDevice->PortOffset); + iounmap(pDevice->PortOffset); if (pDevice->pcid) pci_release_regions(pDevice->pcid); |