Commit 79f382b9 authored by zuoqilin's avatar zuoqilin Committed by Mauro Carvalho Chehab

media: media/pci/pt1: Assign value when defining variables

When defining variables and assigning values can be done at the same time.
Signed-off-by: default avatarzuoqilin <zuoqilin@yulong.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 1a77d4fd
...@@ -334,8 +334,7 @@ static int pt1_sync(struct pt1 *pt1) ...@@ -334,8 +334,7 @@ static int pt1_sync(struct pt1 *pt1)
static u64 pt1_identify(struct pt1 *pt1) static u64 pt1_identify(struct pt1 *pt1)
{ {
int i; int i;
u64 id; u64 id = 0;
id = 0;
for (i = 0; i < 57; i++) { for (i = 0; i < 57; i++) {
id |= (u64)(pt1_read_reg(pt1, 0) >> 30 & 1) << i; id |= (u64)(pt1_read_reg(pt1, 0) >> 30 & 1) << i;
pt1_write_reg(pt1, 0, 0x00000008); pt1_write_reg(pt1, 0, 0x00000008);
...@@ -1122,8 +1121,7 @@ static int pt1_i2c_end(struct pt1 *pt1, int addr) ...@@ -1122,8 +1121,7 @@ static int pt1_i2c_end(struct pt1 *pt1, int addr)
static void pt1_i2c_begin(struct pt1 *pt1, int *addrp) static void pt1_i2c_begin(struct pt1 *pt1, int *addrp)
{ {
int addr; int addr = 0;
addr = 0;
pt1_i2c_emit(pt1, addr, 0, 0, 1, 1, addr /* itself */); pt1_i2c_emit(pt1, addr, 0, 0, 1, 1, addr /* itself */);
addr = addr + 1; addr = addr + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment