From patchwork Tue Jul 10 11:01:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 10516841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1E02600CA for ; Tue, 10 Jul 2018 11:01:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B52A928D32 for ; Tue, 10 Jul 2018 11:01:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9AF328D3A; Tue, 10 Jul 2018 11:01:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6809428D32 for ; Tue, 10 Jul 2018 11:01:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B7306E915; Tue, 10 Jul 2018 11:01:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8BA716E915 for ; Tue, 10 Jul 2018 11:01:30 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id b15-v6so14139530wrv.10 for ; Tue, 10 Jul 2018 04:01:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=P4j28FBiLT2qYrQ5zUN+FtTJTFm05XJVI1Nng0WKOeo=; b=mqLm6eR4402zxVatRg+JO6OHPIKmJxhbT8ck41kk3vGcWXMG10PFKI554MabjUfjRl GgwI5K2TIa4TlTwTZugbDo9UkohTn8Vkx8/q5r45rYT7+E5BtQmf7S9MBE3GciS7XwOc c3og0CsrGKfV7g7gQDSxcz7wq1JpUmpTka1eLeKxTC120hJUzAJRUfTz1/i0x520zp2h LdqmnPi4ltc9UbN8T9egzEvhTaANVQ1emYZur+jRZlwXN5qP/vXPcV2+ua+QRNhlFqmP HHOicLH6X6vEz8pTs40BDn1oCLXn/ddLilumLMQjtL5YSTPk7KOV0oVWvgPPqSb4kRVB 7TvQ== X-Gm-Message-State: APt69E0BG6TRP400na809WS/7ZRXqYwUu9+AkpAOVIbra3YTTW2hYH8D SvHFcJdLy9kGIfetqiD2TxM= X-Google-Smtp-Source: AAOMgpeXaWw21m/KY2ms4ibuagQOKpZ6PKId9g05fuVwppQ9fmTDMlV2tGIWVEGO61hjz9vmDbWA5w== X-Received: by 2002:adf:f50e:: with SMTP id q14-v6mr16050371wro.241.1531220489143; Tue, 10 Jul 2018 04:01:29 -0700 (PDT) Received: from localhost (pD9E51B8F.dip0.t-ipconnect.de. [217.229.27.143]) by smtp.gmail.com with ESMTPSA id c18-v6sm21617039wrq.17.2018.07.10.04.01.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 04:01:28 -0700 (PDT) From: Thierry Reding To: Thierry Reding Subject: [PATCH] drm/panel: innolux-p079zca: Use of_device_get_match_data() Date: Tue, 10 Jul 2018 13:01:27 +0200 Message-Id: <20180710110127.12315-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.17.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Lin Huang MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Use this helper to get rid of some extra boilerplate code. Signed-off-by: Thierry Reding Reviewed-by: Heiko Stuebner --- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; - id = of_match_node(innolux_of_match, dsi->dev.of_node); - if (!id) - return -ENODEV; - - desc = id->data; + desc = of_device_get_match_data(dsi->dev); dsi->mode_flags = desc->flags; dsi->format = desc->format; dsi->lanes = desc->lanes;