aboutsummaryrefslogtreecommitdiffstats
path: root/patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch')
-rw-r--r--patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch100
1 files changed, 100 insertions, 0 deletions
diff --git a/patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch b/patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch
new file mode 100644
index 00000000000000..4dc7b7ee5059e3
--- /dev/null
+++ b/patches.at91/0144-media-at91sam9x5-video-cleanup-modifications.patch
@@ -0,0 +1,100 @@
+From b2453fc81b197e3fbcfebdc3be5509dcaea82f59 Mon Sep 17 00:00:00 2001
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Tue, 16 Oct 2012 18:26:10 +0200
+Subject: media/at91sam9x5-video: cleanup modifications
+
+pdata not used: remove them for now: ease transition to DT
+one type, one static, and one debug message modifications
+
+Can we squashed in another patch...
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+---
+ drivers/media/video/at91sam9x5-video.c | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/media/video/at91sam9x5-video.c b/drivers/media/video/at91sam9x5-video.c
+index 26ce376..c83dad1 100644
+--- a/drivers/media/video/at91sam9x5-video.c
++++ b/drivers/media/video/at91sam9x5-video.c
+@@ -347,8 +347,7 @@ static irqreturn_t at91sam9x5_video_irq(int irq, void *data)
+ heoimr = at91sam9x5_video_read32(priv, REG_HEOIMR);
+ handled = at91sam9x5_video_handle_irqstat(priv);
+
+- debug("%x, HEOCHSR = %08x\n", handled,
+- at91sam9x5_video_read32(priv, REG_HEOCHSR));
++ debug("HEOIMR = 0x%08x, HEOCHSR = 0x%08x\n", heoimr, handled);
+
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+@@ -475,7 +474,7 @@ static void at91sam9x5_video_show_buf(struct at91sam9x5_video_priv *priv,
+ priv->next.plane_size[2] = priv->plane_size[2];
+ }
+
+-static int experimental;
++static bool experimental;
+ module_param(experimental, bool, 0644);
+ MODULE_PARM_DESC(experimental, "enable experimental features");
+
+@@ -1155,8 +1154,8 @@ static int at91sam9x5_video_register(struct at91sam9x5_video_priv *priv,
+ int ret = -ENOMEM;
+ struct platform_device *pdev = priv->pdev;
+ struct resource *res;
+- const struct at91sam9x5_video_pdata *pdata =
+- dev_get_platdata(&pdev->dev);
++ /*const struct at91sam9x5_video_pdata *pdata =
++ dev_get_platdata(&pdev->dev);*/
+ struct vb2_queue *q = &priv->queue;
+ unsigned long flags;
+
+@@ -1171,10 +1170,13 @@ static int at91sam9x5_video_register(struct at91sam9x5_video_priv *priv,
+ /* XXX: this doesn't belong here, does it? */
+ pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
++ /* Not used for now */
++#if 0
+ if (!pdata) {
+ dev_err(&pdev->dev, "failed to get platform data\n");
+ goto err_get_pdata;
+ }
++#endif
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+@@ -1272,10 +1274,14 @@ err_queue_init:
+ iounmap(priv->regbase);
+
+ priv->fbinfo = NULL;
++ } else {
++ dev_info(&pdev->dev,
++ "video device registered @ 0x%08x, irq = %d\n",
++ (unsigned int)priv->regbase, priv->irq);
+ }
+ err_ioremap:
+ err_get_regbase:
+- err_get_pdata:
++/* err_get_pdata:*/
+
+ return ret;
+ }
+@@ -1369,7 +1375,7 @@ err_alloc_priv:
+ return 0;
+ }
+
+-int __devexit at91sam9x5_video_remove(struct platform_device *pdev)
++static int __devexit at91sam9x5_video_remove(struct platform_device *pdev)
+ {
+ struct at91sam9x5_video_priv *priv = platform_get_drvdata(pdev);
+
+@@ -1386,7 +1392,7 @@ static struct platform_driver at91sam9x5_video_driver = {
+ .owner = THIS_MODULE,
+ },
+ .probe = at91sam9x5_video_probe,
+- .remove = at91sam9x5_video_remove,
++ .remove = __devexit_p(at91sam9x5_video_remove),
+ };
+
+ static struct platform_device *at91sam9x5_video_device;
+--
+1.8.0.197.g5a90748
+