Re: [V2, 2/2] media: i2c: Add more sensor modes for ov8856 camera sensor

Sakari Ailus
2019-10-30T13:56:22Z

On Wed, Oct 30, 2019 at 09:04:13PM +0800, Dongchun Zhu wrote:
> > > + ov8856->is_1B_revision = (val == OV8856_1B_MODULE) ? 1 : 0;
> >
> > !! will give same result without using ternary operator.
> >
>
> Fixed in next release.

But casting to bool will have the same effect. Integers are also not
needed. I.e. this can be written as:

ov8856->is_1B_revision = val == OV8856_1B_MODULE;

--
Sakari Ailus

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org