V4L/DVB (13763): [Mantis] HIF I/O: trim delays a bit appropriately
authorManu Abraham <abraham.manu@gmail.com>
Fri, 4 Dec 2009 08:22:57 +0000 (05:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 17 Jan 2010 13:55:37 +0000 (11:55 -0200)
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/mantis/mantis_hif.c

index 1ccd8696953493f0fa5a66fe887497b5945c7574..880b99634c294b247bf1bcde0ae05635b1082305 100644 (file)
@@ -133,11 +133,11 @@ int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr)
                dprintk(verbose, MANTIS_ERROR, 1, "Adapter(%d) Slot(0): HIF Smart Buffer operation failed", mantis->num);
                return -EREMOTEIO;
        }
-       udelay(50);
        ca->hif_job_queue &= ~MANTIS_HIF_IOMRD;
        data = mmread(MANTIS_GPIF_DIN);
        hif_addr |= MANTIS_GPIF_PCMCIAREG;
        mmwrite(hif_addr, MANTIS_GPIF_ADDR);
+       udelay(50);
 
        return (u8) data;
 }
@@ -162,10 +162,10 @@ int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data)
                dprintk(verbose, MANTIS_ERROR, 1, "Adapter(%d) Slot(0): HIF Smart Buffer operation failed", mantis->num);
                return -EREMOTEIO;
        }
-       udelay(50);
        ca->hif_job_queue &= ~MANTIS_HIF_IOMWR;
        hif_addr |= MANTIS_GPIF_PCMCIAREG;
        mmwrite(hif_addr, MANTIS_GPIF_ADDR);
+       udelay(50);
 
        return 0;
 }