aboutsummaryrefslogtreecommitdiffstats
path: root/patches.at91/0128-media-at91sam9x5-video-cleanup-modifications.patch
blob: 1ab43917919d56cfb200a9989bb190627c7b71c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From 139db41120d5755f7a086fb8dc6d7080d10fd135 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