Received: by 10.192.165.156 with SMTP id m28csp153582imm; Sun, 15 Apr 2018 19:36:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+yfTdLLfvtqv1rLHCUl1AVo1NmpSWXJx7s5tge2s0sBJogS7B/Ec6TjXSgfg2NWyPBI9PM X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr13425795pls.88.1523846195652; Sun, 15 Apr 2018 19:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523846195; cv=none; d=google.com; s=arc-20160816; b=v/BGeoDSTn5Gc50QGP632shRQw0rtbOcYiSCeNnVcQOiu0dKE0Wr51Fi8a/Y4UKBGy 1HxZ4g4x329WRM8/cbRHaMZiwLgoj4grgu28O+W9BIJzF4bUPx9+x5KVNDKiOCSDBwDO hVgiuBHhRzpDOU7y2QInmr0xfk5Nc+8bGiO//owa4OHxYjBnU4hwI3Vatab4PX/hNBc+ VoJuWVHnFf59VLM4yKSsXf5xmiEo7QQ/eWF7SWBJ5f+s6mPgMw0TJLdMRoCdFpywCbU9 34UHlzmj4aTcYdO82HZp1Eo3omdX+qsNgQ1niNRR0qkKZ5CaAK3WPvFoc6uj8grXFe4R YbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=eqJ9fDZ75GNhj3Y1SxKh/F8PRJZjd3jdljNmDY5nHK8=; b=AARyCi9BgG9izP6YQkOvOoh5Bu0vJkPCmrJX2PIj2a40MBOnB78jVlcEROQLfc5XxE 6iS1uggOAttnwvFk+3rTVT1LvFoKr0ehMaFpPClcbcpBkzuxsfv6Y1Az19klqKQ8WY/C Mmxrgy7rxOGcTsXMV4Jjkb09Y+/b2QOYf0AWSGxRXJjS0ItLXIkCsqI5zoofYw4lFY06 as5GuOj+B6MGS2eOgWagaq3V8hIxbeRYj7nrDhUDRDC6IHfmnlBzTpvkkL+xZr1uFLMc 4SZI8T5pNTDG/1Ep/FqCRZ8TUJ8sVWAf5+X8MAXtFzs58yeDeJO8ty7sHJ2sU5+TyvWN wh8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si4250030pgn.37.2018.04.15.19.36.21; Sun, 15 Apr 2018 19:36:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753244AbeDPCej (ORCPT + 99 others); Sun, 15 Apr 2018 22:34:39 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:34904 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752928AbeDPCeh (ORCPT ); Sun, 15 Apr 2018 22:34:37 -0400 X-UUID: 72fcad1891674909ae0bde42d104f217-20180416 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 259579596; Mon, 16 Apr 2018 10:34:33 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 16 Apr 2018 10:34:31 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 16 Apr 2018 10:34:31 +0800 From: Ryder Lee To: Mauro Carvalho Chehab CC: Sean Wang , , , , , Ryder Lee Subject: [PATCH] media: rc: mtk-cir: use of_device_get_match_data() Date: Mon, 16 Apr 2018 10:34:30 +0800 Message-ID: <39601fe0c5daf9bcdbb3e44390b671a12d508e00.1523347340.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com> References: <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The usage of of_device_get_match_data() reduce the code size a bit. Signed-off-by: Ryder Lee --- drivers/media/rc/mtk-cir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c index e88eb64..e42efd9 100644 --- a/drivers/media/rc/mtk-cir.c +++ b/drivers/media/rc/mtk-cir.c @@ -299,8 +299,6 @@ static int mtk_ir_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *dn = dev->of_node; - const struct of_device_id *of_id = - of_match_device(mtk_ir_match, &pdev->dev); struct resource *res; struct mtk_ir *ir; u32 val; @@ -312,7 +310,7 @@ static int mtk_ir_probe(struct platform_device *pdev) return -ENOMEM; ir->dev = dev; - ir->data = of_id->data; + ir->data = of_device_get_match_data(dev); ir->clk = devm_clk_get(dev, "clk"); if (IS_ERR(ir->clk)) { -- 1.9.1