diff mbox series

media: i2c: tc358746: make DEFINE_RUNTIME_DEV_PM_OPS static

Message ID a74a7352-d75e-e202-4a7e-6ffb552455a2@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series media: i2c: tc358746: make DEFINE_RUNTIME_DEV_PM_OPS static | expand

Commit Message

Hans Verkuil Nov. 28, 2022, 1:55 p.m. UTC
DEFINE_RUNTIME_DEV_PM_OPS should be static.

This fixes this sparse warning:

drivers/media/i2c/tc358746.c:1671:1: warning: symbol 'tc358746_pm_ops' was not declared. Should it be static?

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---

Comments

Marco Felsch Nov. 28, 2022, 2:03 p.m. UTC | #1
Hi Hans,

thanks for the patch.

On 22-11-28, Hans Verkuil wrote:
> DEFINE_RUNTIME_DEV_PM_OPS should be static.
> 
> This fixes this sparse warning:
> 
> drivers/media/i2c/tc358746.c:1671:1: warning: symbol 'tc358746_pm_ops' was not declared. Should it be static?
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>

> ---
> diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
> index 171309c62bb8..d1f552bd81d4 100644
> --- a/drivers/media/i2c/tc358746.c
> +++ b/drivers/media/i2c/tc358746.c
> @@ -1668,8 +1668,8 @@ static int tc358746_resume(struct device *dev)
>  	return err;
>  }
> 
> -DEFINE_RUNTIME_DEV_PM_OPS(tc358746_pm_ops, tc358746_suspend,
> -			  tc358746_resume, NULL);
> +static DEFINE_RUNTIME_DEV_PM_OPS(tc358746_pm_ops, tc358746_suspend,
> +				 tc358746_resume, NULL);
> 
>  static const struct of_device_id __maybe_unused tc358746_of_match[] = {
>  	{ .compatible = "toshiba,tc358746" },
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index 171309c62bb8..d1f552bd81d4 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -1668,8 +1668,8 @@  static int tc358746_resume(struct device *dev)
 	return err;
 }

-DEFINE_RUNTIME_DEV_PM_OPS(tc358746_pm_ops, tc358746_suspend,
-			  tc358746_resume, NULL);
+static DEFINE_RUNTIME_DEV_PM_OPS(tc358746_pm_ops, tc358746_suspend,
+				 tc358746_resume, NULL);

 static const struct of_device_id __maybe_unused tc358746_of_match[] = {
 	{ .compatible = "toshiba,tc358746" },