From: Sakari Ailus <sakari.ailus@iki.fi>
To: Hidenori Kobayashi <hidenorik@chromium.org>
Cc: Dongchun Zhu <dongchun.zhu@mediatek.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] media: ov8856: Add runtime PM callbacks
Date: Tue, 25 Oct 2022 14:33:54 +0300 [thread overview]
Message-ID: <Y1fJokE9mfZJ8fad@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <20221006095846.pvhmis44z777fnsl@google.com>
Hi Hidenori,
On Thu, Oct 06, 2022 at 06:58:46PM +0900, Hidenori Kobayashi wrote:
> > @@ -2148,17 +2149,20 @@ static int __ov8856_power_on(struct ov8856 *ov8856)
> > return ret;
> > }
> >
> > -static void __ov8856_power_off(struct ov8856 *ov8856)
> > +static int ov8856_power_off(struct device *dev)
> > {
> > - struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd);
> > + struct v4l2_subdev *sd = dev_get_drvdata(dev);
> > + struct ov8856 *ov8856 = to_ov8856(sd);
> >
> > - if (is_acpi_node(dev_fwnode(&client->dev)))
> > - return;
> > + if (is_acpi_node(dev_fwnode(dev)))
> > + return 0;
> >
> > gpiod_set_value_cansleep(ov8856->reset_gpio, 1);
> > regulator_bulk_disable(ARRAY_SIZE(ov8856_supply_names),
> > ov8856->supplies);
> > clk_disable_unprepare(ov8856->xvclk);
> > +
> > + return 0;
> > }
> >
> > static int __maybe_unused ov8856_suspend(struct device *dev)
Applied with the following diff as the remove function's return type is now
void.
diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
index 9e1361eed91f0..cf8384e09413b 100644
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -2456,8 +2456,6 @@ static void ov8856_remove(struct i2c_client *client)
mutex_destroy(&ov8856->mutex);
ov8856_power_off(&client->dev);
-
- return 0;
}
static int ov8856_probe(struct i2c_client *client)
--
Sakari Ailus
next prev parent reply other threads:[~2022-10-25 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 9:24 Hidenori Kobayashi
2022-10-06 9:58 ` Hidenori Kobayashi
2022-10-06 10:17 ` Sakari Ailus
2022-10-25 11:33 ` Sakari Ailus [this message]
2022-10-06 10:12 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1fJokE9mfZJ8fad@valkosipuli.retiisi.eu \
--to=sakari.ailus@iki.fi \
--cc=dongchun.zhu@mediatek.com \
--cc=hidenorik@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®