Re: RESEND[PATCH v6 2/2] media: dw9807: Add dw9807 vcm driver

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

 



Hi Jacopo,

On Tue, Mar 20, 2018 at 11:28:17AM +0100, jacopo mondi wrote:
...
> > +static int dw9807_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
> > +{
> > +	int rval;
> > +
> > +	rval = pm_runtime_get_sync(sd->dev);
> > +	if (rval < 0) {
> > +		pm_runtime_put_noidle(sd->dev);
> 
> If you fail to get pm context, no need to put it back (I presume)

pm_runtime_get() must be followed by pm_runtime_put() whether the former
succeeds or not.

...

> > +static const struct of_device_id dw9807_of_table[] = {
> > +	{ .compatible = "dongwoon,dw9807" },
> > +	{ { 0 } }
> 
> { } is enough.

{ } is GCC specific while { { 0 } } isn't.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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