mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 22:00:53 +07:00
V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
This saves an initialization and a comparison. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
2c4a07b2da
commit
d6f34d7add
@ -508,7 +508,7 @@ static int ir_probe(struct i2c_adapter *adap)
|
|||||||
static const int probe_em28XX[] = { 0x30, 0x47, -1 };
|
static const int probe_em28XX[] = { 0x30, 0x47, -1 };
|
||||||
static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
|
static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
|
||||||
static const int probe_cx23885[] = { 0x6b, -1 };
|
static const int probe_cx23885[] = { 0x6b, -1 };
|
||||||
const int *probe = NULL;
|
const int *probe;
|
||||||
struct i2c_client *c;
|
struct i2c_client *c;
|
||||||
unsigned char buf;
|
unsigned char buf;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
@ -532,9 +532,9 @@ static int ir_probe(struct i2c_adapter *adap)
|
|||||||
case I2C_HW_B_CX23885:
|
case I2C_HW_B_CX23885:
|
||||||
probe = probe_cx23885;
|
probe = probe_cx23885;
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
if (NULL == probe)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
c = kzalloc(sizeof(*c), GFP_KERNEL);
|
c = kzalloc(sizeof(*c), GFP_KERNEL);
|
||||||
if (!c)
|
if (!c)
|
||||||
|
Loading…
Reference in New Issue
Block a user