Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6
[pandora-kernel.git] / drivers / video / via / via-core.c
index 86bd719..6723d69 100644 (file)
@@ -110,6 +110,13 @@ void viafb_irq_disable(u32 mask)
 EXPORT_SYMBOL_GPL(viafb_irq_disable);
 
 /* ---------------------------------------------------------------------- */
 EXPORT_SYMBOL_GPL(viafb_irq_disable);
 
 /* ---------------------------------------------------------------------- */
+/*
+ * Currently, the camera driver is the only user of the DMA code, so we
+ * only compile it in if the camera driver is being built.  Chances are,
+ * most viafb systems will not need to have this extra code for a while.
+ * As soon as another user comes long, the ifdef can be removed.
+ */
+#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE)
 /*
  * Access to the DMA engine.  This currently provides what the camera
  * driver needs (i.e. outgoing only) but is easily expandable if need
 /*
  * Access to the DMA engine.  This currently provides what the camera
  * driver needs (i.e. outgoing only) but is easily expandable if need
@@ -338,7 +345,7 @@ int viafb_dma_copy_out_sg(unsigned int offset, struct scatterlist *sg, int nsg)
        return 0;
 }
 EXPORT_SYMBOL_GPL(viafb_dma_copy_out_sg);
        return 0;
 }
 EXPORT_SYMBOL_GPL(viafb_dma_copy_out_sg);
-
+#endif /* CONFIG_VIDEO_VIA_CAMERA */
 
 /* ---------------------------------------------------------------------- */
 /*
 
 /* ---------------------------------------------------------------------- */
 /*
@@ -527,7 +534,12 @@ static struct viafb_subdev_info {
        },
        {
                .name = "viafb-i2c",
        },
        {
                .name = "viafb-i2c",
-       }
+       },
+#if defined(CONFIG_VIDEO_VIA_CAMERA) || defined(CONFIG_VIDEO_VIA_CAMERA_MODULE)
+       {
+               .name = "viafb-camera",
+       },
+#endif
 };
 #define N_SUBDEVS ARRAY_SIZE(viafb_subdevs)
 
 };
 #define N_SUBDEVS ARRAY_SIZE(viafb_subdevs)