Received: by 10.192.165.156 with SMTP id m28csp1388633imm; Mon, 16 Apr 2018 21:00:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+oHtMPhX0XVQEp/HoeMDWpZb9U62ek96Ds1qrv0x7K3M/VAPayXxmQ64OlK3Z74vBjAm46 X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr497821plp.73.1523937607960; Mon, 16 Apr 2018 21:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523937607; cv=none; d=google.com; s=arc-20160816; b=V/1P3UPiQdxgjr2Se9qoAqiF3cKDlHSjejAqcLlm4lv4uwfQYDPMrr2cRyUheUqW58 YnkYUfmpT8oPcu+/6inJv12sF/MNy2Hy9UygJSw5Doe5cj480RjWGpCTRgqxWHCAB/52 5RIAAv5IB5MxrT0BJfiVRmhFulsoAowHnYS4k7cUgxwU48eq91qOPcm3VxMYi1aXdt+i TpgAlGigBHLbV1+M7IC59wZGvEjHctRNDOmBNqPx28MAKdQNCVEQILty+8qKUtE7l7Pk iG7qHyDDFiERfU+P7IvhiGBSNp5buVXXwt5p1bCQlDRq6yduuLVFhsEtR+n8pDkEJslp woJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=mkfKCcoxS2xtBtJ4xEuNzzV6MXc9N05BEQ441L+pQgY=; b=xpsE28DTbYkJrt6tPd78PVJc4lmJtp6NnZ9cuwCaW//QnCOk8znq1vRADfZz65Khzb n+2zQn9Jv1d68gkP3nzMNRRfBDcosFUY1sZKRGgshL7cT5u5apaAXtPy60Bb21PXIHxv 3xg2QeoHjrudXIx4eQMvN734jcnerbpjkcw63bXjtPFem6h2us9DMKb0duAk73RzGkM1 Yv8CX6gUONrYdhn7KDgM4m97J9WSXOERFBUU03CqDQ+JpXs2f9Md+aqZwWTAT+Y/lZoT jq3K2dxShDAWL1PoVBDjr9zyvjB2sf2mP3BrAFmT3VnBzOn0Sl7QDwOb2TUdiEdBnLij PkyQ== 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 h16-v6si13798461pli.474.2018.04.16.20.59.53; Mon, 16 Apr 2018 21:00:07 -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 S1752725AbeDQD6s (ORCPT + 99 others); Mon, 16 Apr 2018 23:58:48 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:15923 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751970AbeDQD6q (ORCPT ); Mon, 16 Apr 2018 23:58:46 -0400 X-UUID: 2fcc7e836a8849409e311c9c0de5758b-20180417 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 744501950; Tue, 17 Apr 2018 11:58:42 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 17 Apr 2018 11:58:40 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 17 Apr 2018 11:58:40 +0800 Message-ID: <1523937520.12959.2.camel@mtkswgap22> Subject: Re: [PATCH] media: rc: mtk-cir: use of_device_get_match_data() From: Sean Wang To: Ryder Lee CC: Mauro Carvalho Chehab , , , , Date: Tue, 17 Apr 2018 11:58:40 +0800 In-Reply-To: <39601fe0c5daf9bcdbb3e44390b671a12d508e00.1523347340.git.ryder.lee@mediatek.com> References: <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com> <39601fe0c5daf9bcdbb3e44390b671a12d508e00.1523347340.git.ryder.lee@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-04-16 at 10:34 +0800, Ryder Lee wrote: > 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)) { Acked-by: Sean Wang