Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124535
b: refs/heads/master
c: 0f28b79
h: refs/heads/master
i:
  124533: d16e836
  124531: 1b867d9
  124527: fdb2bb6
v: v3
  • Loading branch information
roel kluin authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent e810dee commit 22e0430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d25cb6461ac93683ac04b2e181bcaa0cc15c349b
refs/heads/master: 0f28b79346439ef5db130020aa07be9ca7c2ee84
13 changes: 5 additions & 8 deletions trunk/drivers/media/video/mt9m111.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,18 +634,15 @@ static int mt9m111_set_flip(struct soc_camera_device *icd, int flip, int mask)

static int mt9m111_get_global_gain(struct soc_camera_device *icd)
{
unsigned int data, gain;
int data;

data = reg_read(GLOBAL_GAIN);
if (data >= 0)
gain = ((data & (1 << 10)) * 2)
| ((data & (1 << 9)) * 2)
| (data & 0x2f);
else
gain = data;

return gain;
return (data & 0x2f) * (1 << ((data >> 10) & 1)) *
(1 << ((data >> 9) & 1));
return data;
}

static int mt9m111_set_global_gain(struct soc_camera_device *icd, int gain)
{
u16 val;
Expand Down

0 comments on commit 22e0430

Please sign in to comment.