Home
last modified time | relevance | path

Searched hist:"8 fd390b89cc8ca786bc1b66d8a76512a6068b081" (Results 1 – 6 of 6) sorted by relevance

/openbmc/linux/drivers/media/platform/sunxi/sun4i-csi/
H A Dsun4i_v4l2.cdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
/openbmc/linux/include/media/
H A Dv4l2-mc.hdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
/openbmc/linux/drivers/media/v4l2-core/
H A Dv4l2-mc.cdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
/openbmc/linux/drivers/media/platform/qcom/camss/
H A Dcamss-video.cdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
/openbmc/linux/drivers/staging/media/imx/
H A Dimx-media-capture.cdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
/openbmc/linux/drivers/staging/media/omap4iss/
H A Diss_video.cdiff 8fd390b89cc8ca786bc1b66d8a76512a6068b081 Fri Jan 24 14:35:43 CST 2020 Ezequiel Garcia <ezequiel@collabora.com> media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}

Currently, v4l2_pipeline_pm_use() prototype is:

int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.

Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.

It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.

And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>