Re: [PATCH v3] media: ov8856: Add runtime PM callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux