]> err.no Git - linux-2.6/blobdiff - drivers/media/common/saa7146_core.c
V4L/DVB (8529): mxl5007t: enable _init and _sleep power management functionality
[linux-2.6] / drivers / media / common / saa7146_core.c
index 168a8d3a5e556e889b7b44033b06531addb9faf8..d01965e96927b2477530ed666d86001eb68be946 100644 (file)
@@ -74,7 +74,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
                if (err) {
                        printk(KERN_ERR "%s: %s timed out while waiting for "
                                        "registers getting programmed\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                        return -ETIMEDOUT;
                }
                msleep(1);
@@ -89,7 +89,7 @@ static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
                saa7146_read(dev, MC2);
                if (err) {
                        DEB_S(("%s: %s timed out while waiting for transfer "
-                               "completion\n", dev->name, __FUNCTION__));
+                               "completion\n", dev->name, __func__));
                        return -ETIMEDOUT;
                }
                msleep(1);
@@ -111,7 +111,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
                if (!loops--) {
                        printk(KERN_ERR "%s: %s timed out while waiting for "
                                        "registers getting programmed\n",
-                                       dev->name, __FUNCTION__);
+                                       dev->name, __func__);
                        return -ETIMEDOUT;
                }
                udelay(1);
@@ -125,7 +125,7 @@ static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
                saa7146_read(dev, MC2);
                if (!loops--) {
                        DEB_S(("%s: %s timed out while waiting for transfer "
-                               "completion\n", dev->name, __FUNCTION__));
+                               "completion\n", dev->name, __func__));
                        return -ETIMEDOUT;
                }
                udelay(5);
@@ -233,7 +233,7 @@ void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt)
 
 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
 {
-       u32          *cpu;
+       __le32       *cpu;
        dma_addr_t   dma_addr;
 
        cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
@@ -250,7 +250,7 @@ int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
 int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt,
        struct scatterlist *list, int sglen  )
 {
-       u32 *ptr, fill;
+       __le32 *ptr, fill;
        int nr_pages = 0;
        int i,p;
 
@@ -306,25 +306,22 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id)
                return IRQ_NONE;
        }
 
-       if( 0 != (dev->ext)) {
-               if( 0 != (dev->ext->irq_mask & isr )) {
-                       if( 0 != dev->ext->irq_func ) {
+       if (dev->ext) {
+               if (dev->ext->irq_mask & isr) {
+                       if (dev->ext->irq_func)
                                dev->ext->irq_func(dev, &isr);
-                       }
                        isr &= ~dev->ext->irq_mask;
                }
        }
        if (0 != (isr & (MASK_27))) {
                DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
-               if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+               if (dev->vv_data && dev->vv_callback)
                        dev->vv_callback(dev,isr);
-               }
                isr &= ~MASK_27;
        }
        if (0 != (isr & (MASK_28))) {
-               if( 0 != dev->vv_data && 0 != dev->vv_callback) {
+               if (dev->vv_data && dev->vv_callback)
                        dev->vv_callback(dev,isr);
-               }
                isr &= ~MASK_28;
        }
        if (0 != (isr & (MASK_16|MASK_17))) {