LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Ryder Lee <ryder.lee@mediatek.com> To: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Sean Wang <sean.wang@mediatek.com>, <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, Ryder Lee <ryder.lee@mediatek.com> Subject: [PATCH] media: rc: mtk-cir: use of_device_get_match_data() Date: Mon, 16 Apr 2018 10:34:30 +0800 [thread overview] Message-ID: <39601fe0c5daf9bcdbb3e44390b671a12d508e00.1523347340.git.ryder.lee@mediatek.com> (raw) In-Reply-To: <31f944ab8dfcc1d7b6f03b35657a2a34825b5246.1523347340.git.ryder.lee@mediatek.com> The usage of of_device_get_match_data() reduce the code size a bit. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> --- 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
next prev parent reply other threads:[~2018-04-16 2:34 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-16 2:32 [PATCH] i2c: mediatek: use of_device_get_match_data() Ryder Lee 2018-04-16 2:33 ` [PATCH] spi: mediatek: Use of_device_get_match_data() Ryder Lee 2018-04-30 7:26 ` Ryder Lee 2018-05-01 20:35 ` Mark Brown 2018-04-16 2:33 ` [PATCH] soc: mediatek: use of_device_get_match_data() Ryder Lee 2018-04-17 14:37 ` Matthias Brugger 2018-04-16 2:33 ` [PATCH] net: " Ryder Lee 2018-04-16 17:43 ` David Miller 2018-04-16 2:33 ` [PATCH] mmc: " Ryder Lee 2018-04-19 13:18 ` Ulf Hansson 2018-04-16 2:33 ` [PATCH] mtd: nand: mtk: " Ryder Lee 2018-04-16 4:27 ` xiaolei li 2018-04-22 17:27 ` Boris Brezillon 2018-04-16 2:34 ` [PATCH] thermal: mediatek: " Ryder Lee 2018-04-16 2:34 ` Ryder Lee [this message] 2018-04-17 3:58 ` [PATCH] media: rc: mtk-cir: " Sean Wang 2018-04-28 13:12 ` [PATCH] i2c: mediatek: " Wolfram Sang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=39601fe0c5daf9bcdbb3e44390b671a12d508e00.1523347340.git.ryder.lee@mediatek.com \ --to=ryder.lee@mediatek.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=mchehab@kernel.org \ --cc=sean.wang@mediatek.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).