summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/lc898212.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/lc898212.c')
-rw-r--r--drivers/media/i2c/lc898212.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/i2c/lc898212.c b/drivers/media/i2c/lc898212.c
index 621b97f3f..44cdb876e 100644
--- a/drivers/media/i2c/lc898212.c
+++ b/drivers/media/i2c/lc898212.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -327,14 +327,13 @@ static unsigned int convert_signed16b_to_unsigned10b(s16 data)
327static int lc898212_init(struct lc898212 *priv) 327static int lc898212_init(struct lc898212 *priv)
328{ 328{
329 int err; 329 int err;
330 u16 data; 330 int data;
331 331
332 err = lc898212_write_table(priv, lc898212_init_setting); 332 err = lc898212_write_table(priv, lc898212_init_setting);
333 333
334 err |= regmap_read(priv->regmap16, LC898212_ADOFFSET, 334 err |= regmap_read(priv->regmap16, LC898212_ADOFFSET, &data);
335 (unsigned int *) &data);
336 priv->s_data->def_position = 335 priv->s_data->def_position =
337 convert_signed16b_to_unsigned10b((s16)data); 336 convert_signed16b_to_unsigned10b((s16)(data & 0xffff));
338 err |= regmap_write(priv->regmap16, LC898212_RZ, data); 337 err |= regmap_write(priv->regmap16, LC898212_RZ, data);
339 338
340 /* Servo On */ 339 /* Servo On */