Re: [V4, 2/2] media: i2c: Add DW9768 VCM driver

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

 



Hi Andy,

Thanks for the review.

On Mon, 2020-03-30 at 16:57 +0300, Andy Shevchenko wrote:
> On Mon, Mar 30, 2020 at 08:36:34PM +0800, Dongchun Zhu wrote:
> > This patch adds a V4L2 sub-device driver for DW9768 voice coil moter,
> > providing control to set the desired focus via I2C serial interface.
> 
> ...
> 
> > +static const struct dev_pm_ops dw9768_pm_ops = {
> > +	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> > +				pm_runtime_force_resume)
> > +	SET_RUNTIME_PM_OPS(dw9768_runtime_suspend, dw9768_runtime_resume, NULL)
> > +};
> > +
> > +static struct i2c_driver dw9768_i2c_driver = {
> > +	.driver = {
> > +		.name = DW9768_NAME,
> 
> > +		.pm = IS_ENABLED(CONFIG_PM) ? &dw9768_pm_ops : NULL,
> 
> What is this conditional for?
> 

For the dw9768_pm_ops, here my idea is to use an IS_ENABLED() check to
avoid defining the structure when CONFIG_PM is not set.

> > +		.of_match_table = dw9768_of_table,
> > +	},
> > +	.probe_new  = dw9768_probe,
> > +	.remove = dw9768_remove,
> > +};
> 
> > +
> 
> Extra blank line.
> 

Weird, most V4L2 driver(I2C client) seems to keep this blank line.
Sakari, is it still the case or am I mistaken?

> > +module_i2c_driver(dw9768_i2c_driver);
> 





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux