From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/panel: innolux-p079zca: Use of_device_get_match_data() Date: Tue, 10 Jul 2018 16:24:37 +0200 Message-ID: <20180710142437.GD13242@ulmo> References: <20180710110127.12315-1-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1540183536==" Return-path: Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A6EEF6E96F for ; Tue, 10 Jul 2018 14:24:40 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id n17-v6so24579351wmh.2 for ; Tue, 10 Jul 2018 07:24:40 -0700 (PDT) In-Reply-To: <20180710110127.12315-1-thierry.reding@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Heiko Stuebner , Lin Huang , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1540183536== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZARJHfwaSJQLOEUz" Content-Disposition: inline --ZARJHfwaSJQLOEUz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 10, 2018 at 01:01:27PM +0200, Thierry Reding wrote: > From: Thierry Reding >=20 > Use this helper to get rid of some extra boilerplate code. >=20 > Signed-off-by: Thierry Reding > --- > drivers/gpu/drm/panel/panel-innolux-p079zca.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) >=20 > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/= drm/panel/panel-innolux-p079zca.c > index 185a55060195..62fbaac96823 100644 > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c > @@ -314,14 +314,9 @@ static void innolux_panel_del(struct innolux_panel *= innolux) > static int innolux_panel_probe(struct mipi_dsi_device *dsi) > { > const struct panel_desc *desc; > - const struct of_device_id *id; > int err; > =20 > - id =3D of_match_node(innolux_of_match, dsi->dev.of_node); > - if (!id) > - return -ENODEV; > - > - desc =3D id->data; > + desc =3D of_device_get_match_data(dsi->dev); > dsi->mode_flags =3D desc->flags; > dsi->format =3D desc->format; > dsi->lanes =3D desc->lanes; Oops, I just noticed I had parts of this in a stash which causes the above to fail to build. I've squashed the missing bits into the above, adding an include for linux/of_device.h and passing &dsi->dev instead of dsi->dev to of_device_get_match_data(). Thierry --ZARJHfwaSJQLOEUz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAltEwaUACgkQ3SOs138+ s6Hhgg/8DOOlBTkuF+F9wp6Psqi8Ry76Xal1mt6Hmo/Oq0BLCv0qtMCB63+4MLS8 h6RCWfOgnrWnrb8UhJkmcdFgNbRMyrdPro3y//HFpkO/QAFXepEDfBRV6rdMthPa v70jKxWGmNwXoFOXtl/ba4PxL7KLa066A6OzYLsNUDnsQZzsRHgMP7A0LQdllPSP ifCMnhAil4HRqUpK3kD4T3TzPnXhA2kmfN2hYi1h7921kegdEdRGW8tZa4i4CqwP F9KQPWXKrZxZ1V7R9DcIZHDlZ5FFQW5AsUyQv8q7UBXQfviWtp1BB7FhYdYtGjKd 7aT2MU+EifoBxF8FtyKkeC6QaSiBlHRAB/eJbWQMMXBZ5Z7+p3OUpfHH1kkDY1n5 XeRtNcYDlXUvONUSgtMUUSVmh/LK2DzFlYj5hrbXovIC8EGIi62OXV+tvv5gYNCe T9K1WZnjOpSsby5v1D3Je43ue0BzuLdVMZR95dm6I9Ni+JtQ1HnAOnO2QbMB4hva 7O3cYUBFXBgwPPlKnImRweaCYG3RaFmw26XqNCrjSn/RcDs0EdXrB5nb+YTUHYp9 n4GPhaO2+qs57jDTPBffjimfeYTbe7dH8UY96BZeXayTje/QS0pTizykiGKnyv5A XeRkXyNiRSyLRpfnO0MgVX5a53W4CYD3pIPeCI78cYhjteA4i5c= =0+Lk -----END PGP SIGNATURE----- --ZARJHfwaSJQLOEUz-- --===============1540183536== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1540183536==--