[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6278e7a4-c67a-6198-364e-526042acc393@samsung.com>
Date: Thu, 10 May 2018 09:13:16 +0200
From: Andrzej Hajda <a.hajda@...sung.com>
To: Peter Rosin <peda@...ntia.se>, linux-kernel@...r.kernel.org
Cc: Archit Taneja <architt@...eaurora.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
David Airlie <airlied@...ux.ie>,
Peter Senna Tschudin <peter.senna@...labora.com>,
Martin Donnelly <martin.donnelly@...com>,
Martyn Welch <martyn.welch@...labora.co.uk>,
Gustavo Padovan <gustavo@...ovan.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Sean Paul <seanpaul@...omium.org>,
Inki Dae <inki.dae@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
CK Hu <ck.hu@...iatek.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
Rob Clark <robdclark@...il.com>,
Sandy Huang <hjc@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
Benjamin Gaignard <benjamin.gaignard@...aro.org>,
Vincent Abriou <vincent.abriou@...com>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, linux-renesas-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org, Jyri Sarha <jsarha@...com>,
Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH v2 25/26] drm/bridge: require the owner .odev to be
filled in on drm_bridge_add/attach
On 04.05.2018 15:52, Peter Rosin wrote:
> The .odev owner device will be handy to have around.
>
> Signed-off-by: Peter Rosin <peda@...ntia.se>
Reviewed-by: Andrzej Hajda <a.hajda@...sung.com>
--
Regards
Andrzej
> ---
> drivers/gpu/drm/drm_bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
> index df084db33494..78d186b6831b 100644
> --- a/drivers/gpu/drm/drm_bridge.c
> +++ b/drivers/gpu/drm/drm_bridge.c
> @@ -70,6 +70,9 @@ static LIST_HEAD(bridge_list);
> */
> void drm_bridge_add(struct drm_bridge *bridge)
> {
> + if (WARN_ON(!bridge->odev))
> + return;
> +
> mutex_lock(&bridge_lock);
> list_add_tail(&bridge->list, &bridge_list);
> mutex_unlock(&bridge_lock);
> @@ -115,6 +118,9 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
> if (!encoder || !bridge)
> return -EINVAL;
>
> + if (WARN_ON(!bridge->odev))
> + return -EINVAL;
> +
> if (previous && (!previous->dev || previous->encoder != encoder))
> return -EINVAL;
>
Powered by blists - more mailing lists