mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08:00
media: i2c: adv7180: Print the chip ID on probe
Improve the probe message by printing the chip ID version. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
abb7c7c2f0
commit
f7b96a9f35
@ -1415,11 +1415,19 @@ static int adv7180_probe(struct i2c_client *client,
|
||||
if (ret)
|
||||
goto err_free_irq;
|
||||
|
||||
v4l_info(client, "chip found @ 0x%02x (%s)\n",
|
||||
client->addr, client->adapter->name);
|
||||
mutex_lock(&state->mutex);
|
||||
ret = adv7180_read(state, ADV7180_REG_IDENT);
|
||||
mutex_unlock(&state->mutex);
|
||||
if (ret < 0)
|
||||
goto err_v4l2_async_unregister;
|
||||
|
||||
v4l_info(client, "chip id 0x%x found @ 0x%02x (%s)\n",
|
||||
ret, client->addr, client->adapter->name);
|
||||
|
||||
return 0;
|
||||
|
||||
err_v4l2_async_unregister:
|
||||
v4l2_async_unregister_subdev(sd);
|
||||
err_free_irq:
|
||||
if (state->irq > 0)
|
||||
free_irq(client->irq, state);
|
||||
|
Loading…
Reference in New Issue
Block a user