2013-04-19 09:53:46

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 0/2] media: davinci: vpif trivial cleanup

From: Lad, Prabhakar <[email protected]>

The first patch of the series cleanups the header file inclusion,
and second patch fixes displaying of error when there is actual
failure of request_irq().

Lad, Prabhakar (2):
media: davinci: vpif: remove unwanted header file inclusion
media: davinci: vpif_display: move displaying of error to
approppraite place

drivers/media/platform/davinci/vpif_capture.c | 19 ++++---------------
drivers/media/platform/davinci/vpif_capture.h | 5 +----
drivers/media/platform/davinci/vpif_display.c | 25 ++++---------------------
drivers/media/platform/davinci/vpif_display.h | 5 +----
4 files changed, 10 insertions(+), 44 deletions(-)

--
1.7.4.1


2013-04-19 09:53:52

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 1/2] media: davinci: vpif: remove unwanted header file inclusion

From: Lad, Prabhakar <[email protected]>

this patch removes unwanted header file inclusion and sorts
header alphabetically.

Signed-off-by: Lad, Prabhakar <[email protected]>
---
drivers/media/platform/davinci/vpif_capture.c | 19 ++++---------------
drivers/media/platform/davinci/vpif_capture.h | 5 +----
drivers/media/platform/davinci/vpif_display.c | 23 +++--------------------
drivers/media/platform/davinci/vpif_display.h | 5 +----
4 files changed, 9 insertions(+), 43 deletions(-)

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index 5f98df1..a1b42b0 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -18,28 +18,17 @@
* TODO : add support for VBI & HBI data service
* add static buffer allocation
*/
-#include <linux/kernel.h>
-#include <linux/init.h>
+
#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/mm.h>
#include <linux/interrupt.h>
-#include <linux/workqueue.h>
-#include <linux/string.h>
-#include <linux/videodev2.h>
-#include <linux/wait.h>
-#include <linux/time.h>
-#include <linux/i2c.h>
#include <linux/platform_device.h>
-#include <linux/io.h>
#include <linux/slab.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-ioctl.h>
+
#include <media/v4l2-chip-ident.h>
+#include <media/v4l2-ioctl.h>

-#include "vpif_capture.h"
#include "vpif.h"
+#include "vpif_capture.h"

MODULE_DESCRIPTION("TI DaVinci VPIF Capture driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/media/platform/davinci/vpif_capture.h b/drivers/media/platform/davinci/vpif_capture.h
index 3d3c1e5..0ebb312 100644
--- a/drivers/media/platform/davinci/vpif_capture.h
+++ b/drivers/media/platform/davinci/vpif_capture.h
@@ -22,11 +22,8 @@
#ifdef __KERNEL__

/* Header files */
-#include <linux/videodev2.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-device.h>
#include <media/videobuf2-dma-contig.h>
-#include <media/davinci/vpif_types.h>
+#include <media/v4l2-device.h>

#include "vpif.h"

diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 1b3fb5c..d833056 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -14,33 +14,16 @@
* GNU General Public License for more details.
*/

-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/mm.h>
#include <linux/interrupt.h>
-#include <linux/workqueue.h>
-#include <linux/string.h>
-#include <linux/videodev2.h>
-#include <linux/wait.h>
-#include <linux/time.h>
-#include <linux/i2c.h>
+#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/io.h>
#include <linux/slab.h>

-#include <asm/irq.h>
-#include <asm/page.h>
-
-#include <media/adv7343.h>
-#include <media/v4l2-device.h>
-#include <media/v4l2-ioctl.h>
#include <media/v4l2-chip-ident.h>
+#include <media/v4l2-ioctl.h>

-#include "vpif_display.h"
#include "vpif.h"
+#include "vpif_display.h"

MODULE_DESCRIPTION("TI DaVinci VPIF Display driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/media/platform/davinci/vpif_display.h b/drivers/media/platform/davinci/vpif_display.h
index a5a18f7..5d87fc8 100644
--- a/drivers/media/platform/davinci/vpif_display.h
+++ b/drivers/media/platform/davinci/vpif_display.h
@@ -17,11 +17,8 @@
#define DAVINCIHD_DISPLAY_H

/* Header files */
-#include <linux/videodev2.h>
-#include <media/v4l2-common.h>
-#include <media/v4l2-device.h>
#include <media/videobuf2-dma-contig.h>
-#include <media/davinci/vpif_types.h>
+#include <media/v4l2-device.h>

#include "vpif.h"

--
1.7.4.1

2013-04-19 09:53:59

by Lad, Prabhakar

[permalink] [raw]
Subject: [PATCH 2/2] media: davinci: vpif_display: move displaying of error to approppraite place

From: Lad, Prabhakar <[email protected]>

this patch moves the displaying out error case "VPIF IRQ request failed\n"
when there is actual request_irq() fail.

Signed-off-by: Lad, Prabhakar <[email protected]>
---
drivers/media/platform/davinci/vpif_display.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index d833056..7b17368 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -1725,6 +1725,7 @@ static __init int vpif_probe(struct platform_device *pdev)
for (j = 0; j < i; j++)
free_irq(j, (void *)
(&vpif_obj.dev[res_idx]->channel_id));
+ vpif_err("VPIF IRQ request failed\n");
goto vpif_int_err;
}
}
@@ -1878,7 +1879,6 @@ vpif_sd_error:
}
vpif_int_err:
v4l2_device_unregister(&vpif_obj.v4l2_dev);
- vpif_err("VPIF IRQ request failed\n");
for (i = 0; i < res_idx; i++) {
res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
for (j = res->start; j <= res->end; j++)
--
1.7.4.1