lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201207181858.25078.hartleys@visionengravers.com>
Date:	Wed, 18 Jul 2012 18:58:24 -0700
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
CC:	<devel@...verdev.osuosl.org>, <abbotti@....co.uk>,
	<gregkh@...uxfoundation.org>
Subject: [PATCH 67/90] staging: comedi: dt3000: remove 'phys_addr' from the private data

The 'phys_addr' variable in the private data is simply used as
a flag for the detach function to know that the pci device has
been enabled. Use the 'dev->iobase' variable instead as is more
typical for other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Ian Abbott <abbotti@....co.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/staging/comedi/drivers/dt3000.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index 92558e7..3937e87 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -250,7 +250,6 @@ static const struct dt3k_boardtype dt3k_boardtypes[] = {
 struct dt3k_private {
 
 	struct pci_dev *pci_dev;
-	resource_size_t phys_addr;
 	void __iomem *io_addr;
 	unsigned int lock;
 	unsigned int ao_readback[2];
@@ -824,8 +823,8 @@ static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	if (ret < 0)
 		return ret;
 
-	devpriv->phys_addr = pci_resource_start(pcidev, 0);
-	devpriv->io_addr = ioremap(devpriv->phys_addr, DT3000_SIZE);
+	dev->iobase = pci_resource_start(pcidev, 0);
+	devpriv->io_addr = ioremap(dev->iobase, DT3000_SIZE);
 	if (!devpriv->io_addr)
 		return -ENOMEM;
 
@@ -905,7 +904,7 @@ static void dt3000_detach(struct comedi_device *dev)
 		free_irq(dev->irq, dev);
 	if (devpriv) {
 		if (devpriv->pci_dev) {
-			if (devpriv->phys_addr)
+			if (dev->iobase)
 				comedi_pci_disable(devpriv->pci_dev);
 			pci_dev_put(devpriv->pci_dev);
 		}
-- 
1.7.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ