summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2009-05-10 19:08:27 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 05:14:51 +0200
commit1a6450d4d43a4d4caecaa3ca7796cbe8c7cfbba3 (patch)
tree93c3bdb287eb32c5bff29cdcd6e3d6c12556c761 /drivers/media/video/saa7164
parentV4L/DVB (12926): SAA7164: Email address change (diff)
downloadlinux-1a6450d4d43a4d4caecaa3ca7796cbe8c7cfbba3.tar.xz
linux-1a6450d4d43a4d4caecaa3ca7796cbe8c7cfbba3.zip
V4L/DVB (12927): SAA7164: Remove volatiles for PCI writes (coding style violation)
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164')
-rw-r--r--drivers/media/video/saa7164/saa7164-bus.c2
-rw-r--r--drivers/media/video/saa7164/saa7164-core.c12
-rw-r--r--drivers/media/video/saa7164/saa7164.h6
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c
index 8d813f5b54a8..83a04640a25a 100644
--- a/drivers/media/video/saa7164/saa7164-bus.c
+++ b/drivers/media/video/saa7164/saa7164-bus.c
@@ -257,7 +257,7 @@ int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf)
dprintk(DBGLVL_BUS, "%s() new_swp = %x\n", __func__, new_swp);
- /* TODO: Convert all of the volatiles and direct PCI writes into
+ /* TODO: Convert all of the direct PCI writes into
* saa7164_writel/b calls for consistency.
*/
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c
index bf4ca4f29b01..968ecd4ad495 100644
--- a/drivers/media/video/saa7164/saa7164-core.c
+++ b/drivers/media/video/saa7164/saa7164-core.c
@@ -126,12 +126,13 @@ static irqreturn_t saa7164_irq(int irq, void *dev_id)
/* Check that the hardware is accessable. If the status bytes are
* 0xFF then the device is not accessable, the the IRQ belongs
* to another driver.
+ * 4 x u32 interrupt registers.
*/
for (i = 0; i < INT_SIZE/4; i++) {
/* TODO: Convert into saa7164_readl() */
/* Read the 4 hardware interrupt registers */
- intstat[i] = *(dev->InterruptStatus + i);
+ intstat[i] = saa7164_readl(dev->int_status + (i * 4));
if (intstat[i] != 0xffffffff)
hwacc = 1;
@@ -184,9 +185,8 @@ static irqreturn_t saa7164_irq(int irq, void *dev_id)
}
}
- /* TODO: Convert into saa7164_writel() */
/* Ack it */
- *(dev->InterruptAck + i) = intstat[i];
+ saa7164_writel(dev->int_ack + (i * 4), intstat[i]);
}
}
@@ -487,9 +487,9 @@ static int saa7164_dev_setup(struct saa7164_dev *dev)
printk(KERN_INFO "CORE %s: dev->bmmio2 = 0x%p\n", dev->name,
dev->bmmio2);
- /* TODO: Magic defines used in the windows driver, define these */
- dev->InterruptStatus = (u32 *)(dev->bmmio + 0x183000 + 0xf80);
- dev->InterruptAck = (u32 *)(dev->bmmio + 0x183000 + 0xf90);
+ /* Inerrupt and ack register locations offset of bmmio */
+ dev->int_status = 0x183000 + 0xf80;
+ dev->int_ack = 0x183000 + 0xf90;
printk(KERN_INFO
"CORE %s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h
index 338804f6cd57..2d4d47ba3c1a 100644
--- a/drivers/media/video/saa7164/saa7164.h
+++ b/drivers/media/video/saa7164/saa7164.h
@@ -274,9 +274,9 @@ struct saa7164_dev {
tmComResBusInfo_t bus;
- /* TODO: Urgh, remove volatiles */
- volatile u32 *InterruptStatus;
- volatile u32 *InterruptAck;
+ /* Interrupt status and ack registers */
+ u32 int_status;
+ u32 int_ack;
struct cmd cmds[SAA_CMD_MAX_MSG_UNITS];
struct mutex lock;