summaryrefslogtreecommitdiff
path: root/drivers/media/pci/saa7146
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/saa7146')
-rw-r--r--drivers/media/pci/saa7146/hexium_gemini.c25
-rw-r--r--drivers/media/pci/saa7146/hexium_orion.c21
-rw-r--r--drivers/media/pci/saa7146/mxb.c29
3 files changed, 39 insertions, 36 deletions
diff --git a/drivers/media/pci/saa7146/hexium_gemini.c b/drivers/media/pci/saa7146/hexium_gemini.c
index d31a2d4494d1..5817d9cde4d0 100644
--- a/drivers/media/pci/saa7146/hexium_gemini.c
+++ b/drivers/media/pci/saa7146/hexium_gemini.c
@@ -27,6 +27,7 @@
#include <media/drv-intf/saa7146_vv.h>
#include <linux/module.h>
+#include <linux/kernel.h>
static int debug;
module_param(debug, int, 0);
@@ -69,8 +70,8 @@ struct hexium
struct video_device video_dev;
struct i2c_adapter i2c_adapter;
- int cur_input; /* current input */
- v4l2_std_id cur_std; /* current standard */
+ int cur_input; /* current input */
+ v4l2_std_id cur_std; /* current standard */
};
/* Samsung KS0127B decoder default registers */
@@ -137,19 +138,19 @@ static struct hexium_data hexium_input_select[] = {
are currently *not* supported*/
static struct saa7146_standard hexium_standards[] = {
{
- .name = "PAL", .id = V4L2_STD_PAL,
- .v_offset = 28, .v_field = 288,
- .h_offset = 1, .h_pixels = 680,
+ .name = "PAL", .id = V4L2_STD_PAL,
+ .v_offset = 28, .v_field = 288,
+ .h_offset = 1, .h_pixels = 680,
.v_max_out = 576, .h_max_out = 768,
}, {
- .name = "NTSC", .id = V4L2_STD_NTSC,
- .v_offset = 28, .v_field = 240,
- .h_offset = 1, .h_pixels = 640,
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 28, .v_field = 240,
+ .h_offset = 1, .h_pixels = 640,
.v_max_out = 480, .h_max_out = 640,
}, {
- .name = "SECAM", .id = V4L2_STD_SECAM,
- .v_offset = 28, .v_field = 288,
- .h_offset = 1, .h_pixels = 720,
+ .name = "SECAM", .id = V4L2_STD_SECAM,
+ .v_offset = 28, .v_field = 288,
+ .h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
};
@@ -388,7 +389,7 @@ static struct saa7146_ext_vv vv_data = {
.inputs = HEXIUM_INPUTS,
.capabilities = 0,
.stds = &hexium_standards[0],
- .num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
+ .num_stds = ARRAY_SIZE(hexium_standards),
.std_callback = &std_callback,
};
diff --git a/drivers/media/pci/saa7146/hexium_orion.c b/drivers/media/pci/saa7146/hexium_orion.c
index 043318aa19e2..0a05176c18ab 100644
--- a/drivers/media/pci/saa7146/hexium_orion.c
+++ b/drivers/media/pci/saa7146/hexium_orion.c
@@ -27,6 +27,7 @@
#include <media/drv-intf/saa7146_vv.h>
#include <linux/module.h>
+#include <linux/kernel.h>
static int debug;
module_param(debug, int, 0);
@@ -187,19 +188,19 @@ static struct {
static struct saa7146_standard hexium_standards[] = {
{
- .name = "PAL", .id = V4L2_STD_PAL,
- .v_offset = 16, .v_field = 288,
- .h_offset = 1, .h_pixels = 680,
+ .name = "PAL", .id = V4L2_STD_PAL,
+ .v_offset = 16, .v_field = 288,
+ .h_offset = 1, .h_pixels = 680,
.v_max_out = 576, .h_max_out = 768,
}, {
- .name = "NTSC", .id = V4L2_STD_NTSC,
- .v_offset = 16, .v_field = 240,
- .h_offset = 1, .h_pixels = 640,
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 16, .v_field = 240,
+ .h_offset = 1, .h_pixels = 640,
.v_max_out = 480, .h_max_out = 640,
}, {
- .name = "SECAM", .id = V4L2_STD_SECAM,
- .v_offset = 16, .v_field = 288,
- .h_offset = 1, .h_pixels = 720,
+ .name = "SECAM", .id = V4L2_STD_SECAM,
+ .v_offset = 16, .v_field = 288,
+ .h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
};
@@ -460,7 +461,7 @@ static struct saa7146_ext_vv vv_data = {
.inputs = HEXIUM_INPUTS,
.capabilities = 0,
.stds = &hexium_standards[0],
- .num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
+ .num_stds = ARRAY_SIZE(hexium_standards),
.std_callback = &std_callback,
};
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c
index 930218cc2de1..6b5582b7c595 100644
--- a/drivers/media/pci/saa7146/mxb.c
+++ b/drivers/media/pci/saa7146/mxb.c
@@ -3,7 +3,7 @@
Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
- Visit http://www.themm.net/~mihu/linux/saa7146/mxb.html
+ Visit http://www.themm.net/~mihu/linux/saa7146/mxb.html
for further details about this card.
This program is free software; you can redistribute it and/or modify
@@ -30,6 +30,7 @@
#include <media/v4l2-common.h>
#include <media/i2c/saa7115.h>
#include <linux/module.h>
+#include <linux/kernel.h>
#include "tea6415c.h"
#include "tea6420.h"
@@ -792,24 +793,24 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa
static struct saa7146_standard standard[] = {
{
- .name = "PAL-BG", .id = V4L2_STD_PAL_BG,
- .v_offset = 0x17, .v_field = 288,
- .h_offset = 0x14, .h_pixels = 680,
+ .name = "PAL-BG", .id = V4L2_STD_PAL_BG,
+ .v_offset = 0x17, .v_field = 288,
+ .h_offset = 0x14, .h_pixels = 680,
.v_max_out = 576, .h_max_out = 768,
}, {
- .name = "PAL-I", .id = V4L2_STD_PAL_I,
- .v_offset = 0x17, .v_field = 288,
- .h_offset = 0x14, .h_pixels = 680,
+ .name = "PAL-I", .id = V4L2_STD_PAL_I,
+ .v_offset = 0x17, .v_field = 288,
+ .h_offset = 0x14, .h_pixels = 680,
.v_max_out = 576, .h_max_out = 768,
}, {
- .name = "NTSC", .id = V4L2_STD_NTSC,
- .v_offset = 0x16, .v_field = 240,
- .h_offset = 0x06, .h_pixels = 708,
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 0x16, .v_field = 240,
+ .h_offset = 0x06, .h_pixels = 708,
.v_max_out = 480, .h_max_out = 640,
}, {
- .name = "SECAM", .id = V4L2_STD_SECAM,
- .v_offset = 0x14, .v_field = 288,
- .h_offset = 0x14, .h_pixels = 720,
+ .name = "SECAM", .id = V4L2_STD_SECAM,
+ .v_offset = 0x14, .v_field = 288,
+ .h_offset = 0x14, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
};
@@ -837,7 +838,7 @@ static struct saa7146_ext_vv vv_data = {
.inputs = MXB_INPUTS,
.capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_AUDIO,
.stds = &standard[0],
- .num_stds = sizeof(standard)/sizeof(struct saa7146_standard),
+ .num_stds = ARRAY_SIZE(standard),
.std_callback = &std_callback,
};