diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-16 12:37:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-16 10:28:59 -0400 |
commit | d8a665c93803f26e912100f69120fd432c8ba256 (patch) | |
tree | 6b7399c33daeb2ea546f6f3a292ebf4b11dc622d /drivers/staging/media | |
parent | 746d60e90e0795068bae73fe5231c8aae19922bf (diff) | |
download | lwn-d8a665c93803f26e912100f69120fd432c8ba256.tar.gz lwn-d8a665c93803f26e912100f69120fd432c8ba256.zip |
media: staging: atomisp-gc2235: don't fill an unused var
The code with uses the dummy var is commented out. So,
coment out its definition/initialization.
Fix this warning:
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c: In function 'gc2235_get_intg_factor':
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:249:26: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
u16 reg_val, reg_val_h, dummy;
^~~~~
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 93f9c618f3d8..4b6b6568b3cf 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -246,7 +246,7 @@ static int gc2235_get_intg_factor(struct i2c_client *client, struct v4l2_subdev *sd = i2c_get_clientdata(client); struct gc2235_device *dev = to_gc2235_sensor(sd); struct atomisp_sensor_mode_data *buf = &info->data; - u16 reg_val, reg_val_h, dummy; + u16 reg_val, reg_val_h; int ret; if (!info) @@ -316,7 +316,9 @@ static int gc2235_get_intg_factor(struct i2c_client *client, if (ret) return ret; - dummy = (reg_val_h << 8) | reg_val; +#if 0 + u16 dummy = (reg_val_h << 8) | reg_val; +#endif ret = gc2235_read_reg(client, GC2235_8BIT, GC2235_SH_DELAY_H, ®_val_h); |