summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-tpg.c
diff options
context:
space:
mode:
authorHans Verkuil2015-03-09 15:04:02 +0100
committerMauro Carvalho Chehab2015-04-03 01:46:19 +0200
commitdfff048953eb1e38e1f1ee718ff1295f219f1a89 (patch)
tree0c81ae8561d2f4af4835681c69d32903a479d9c2 /drivers/media/platform/vivid/vivid-tpg.c
parent[media] vivid-tpg: add helper functions to simplify common calculations (diff)
downloadkernel-qcow2-linux-dfff048953eb1e38e1f1ee718ff1295f219f1a89.tar.gz
kernel-qcow2-linux-dfff048953eb1e38e1f1ee718ff1295f219f1a89.tar.xz
kernel-qcow2-linux-dfff048953eb1e38e1f1ee718ff1295f219f1a89.zip
[media] vivid-tpg: add const where appropriate
Added 'const' to several functions where that is possible to do. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-tpg.c')
-rw-r--r--drivers/media/platform/vivid/vivid-tpg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c
index 048b1f128a19..2b7362d4b618 100644
--- a/drivers/media/platform/vivid/vivid-tpg.c
+++ b/drivers/media/platform/vivid/vivid-tpg.c
@@ -1241,8 +1241,8 @@ static void tpg_precalculate_line(struct tpg_data *tpg)
/* need this to do rgb24 rendering */
typedef struct { u16 __; u8 _; } __packed x24;
-void tpg_gen_text(struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
- int y, int x, char *text)
+void tpg_gen_text(const struct tpg_data *tpg, u8 *basep[TPG_MAX_PLANES][2],
+ int y, int x, char *text)
{
int line;
unsigned step = V4L2_FIELD_HAS_T_OR_B(tpg->field) ? 2 : 1;
@@ -1389,7 +1389,7 @@ void tpg_update_mv_step(struct tpg_data *tpg)
}
/* Map the line number relative to the crop rectangle to a frame line number */
-static unsigned tpg_calc_frameline(struct tpg_data *tpg, unsigned src_y,
+static unsigned tpg_calc_frameline(const struct tpg_data *tpg, unsigned src_y,
unsigned field)
{
switch (field) {
@@ -1406,7 +1406,7 @@ static unsigned tpg_calc_frameline(struct tpg_data *tpg, unsigned src_y,
* Map the line number relative to the compose rectangle to a destination
* buffer line number.
*/
-static unsigned tpg_calc_buffer_line(struct tpg_data *tpg, unsigned y,
+static unsigned tpg_calc_buffer_line(const struct tpg_data *tpg, unsigned y,
unsigned field)
{
y += tpg->compose.top;