diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-01-29 20:30:40 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-02-08 08:24:34 +0100 |
commit | 66c7b303c7108db0a6fe6525bf6acc749e979de4 (patch) | |
tree | 2ff5e233e40f46a4c3611b43ded6828c89cfb42d /drivers/staging | |
parent | e25a2589e310d8592ca4197c66ad1bfa6eaf99ca (diff) |
media: atomisp: ov2680: Add dev local variable to probe()
Add a dev local variable to probe(), to allow shortening
&client->dev in various places, including further patches
in this series.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index 90c9d7abded4..6d2b0be6bf86 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -781,6 +781,7 @@ static void ov2680_remove(struct i2c_client *client) static int ov2680_probe(struct i2c_client *client) { + struct device *dev = &client->dev; struct ov2680_device *sensor; int ret; void *pdata; @@ -802,10 +803,10 @@ static int ov2680_probe(struct i2c_client *client) goto out_free; } - pm_runtime_set_suspended(&client->dev); - pm_runtime_enable(&client->dev); - pm_runtime_set_autosuspend_delay(&client->dev, 1000); - pm_runtime_use_autosuspend(&client->dev); + pm_runtime_set_suspended(dev); + pm_runtime_enable(dev); + pm_runtime_set_autosuspend_delay(dev, 1000); + pm_runtime_use_autosuspend(dev); ret = ov2680_s_config(&sensor->sd, client->irq, pdata); if (ret) |