summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2010-03-13 20:37:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:47:15 -0300
commit4e1af31aaaa8cc4a5cc1d894bdf04dfc7450d47f (patch)
tree08f18d52d39f390958e8638dff4123eac7ec8cf8 /drivers/media/video/ivtv/ivtv-irq.c
parent2443baeaa01388f56824c55c087510312b8d8197 (diff)
V4L/DVB: ivtv, ivtvfb: Use a define for the output line and field register address
Get rid of the magic number 0x28c0 used in several places in the ivtv and ivtvfb driver and define the register address to a meaningful name. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index 12d36ca91d53..dbd46c5d6975 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -752,7 +752,7 @@ static void ivtv_irq_vsync(struct ivtv *itv)
* to determine the line being displayed and ensure we handle
* one vsync per frame.
*/
- unsigned int frame = read_reg(0x28c0) & 1;
+ unsigned int frame = read_reg(IVTV_REG_DEC_LINE_FIELD) & 1;
struct yuv_playback_info *yi = &itv->yuv_info;
int last_dma_frame = atomic_read(&yi->next_dma_frame);
struct yuv_frame_info *f = &yi->new_frame_info[last_dma_frame];
@@ -852,9 +852,11 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id)
*/
if (~itv->irqmask & IVTV_IRQ_DEC_VSYNC) {
/* vsync is enabled, see if we're in a new field */
- if ((itv->last_vsync_field & 1) != (read_reg(0x28c0) & 1)) {
+ if ((itv->last_vsync_field & 1) !=
+ (read_reg(IVTV_REG_DEC_LINE_FIELD) & 1)) {
/* New field, looks like we missed it */
- IVTV_DEBUG_YUV("VSync interrupt missed %d\n",read_reg(0x28c0)>>16);
+ IVTV_DEBUG_YUV("VSync interrupt missed %d\n",
+ read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16);
vsync_force = 1;
}
}