From: Fabio Estevam <festevam@gmail.com>
To: linux@rempel-privat.de
Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, wsa@kernel.org,
Fabio Estevam <festevam@gmail.com>
Subject: [PATCH 2/2] i2c: imx: Remove unneeded 'match' variable
Date: Mon, 18 Jan 2021 21:31:48 -0300 [thread overview]
Message-ID: <20210119003148.1793614-2-festevam@gmail.com> (raw)
In-Reply-To: <20210119003148.1793614-1-festevam@gmail.com>
There is no need to have the intermediate 'match' variable.
Assign the device_get_match_data() directly to simplify the code.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/i2c/busses/i2c-imx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 5d0ce70411ad..6e5d26cf3f2f 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1309,7 +1309,6 @@ static int i2c_imx_probe(struct platform_device *pdev)
void __iomem *base;
int irq, ret;
dma_addr_t phy_addr;
- const struct imx_i2c_hwdata *match;
dev_dbg(&pdev->dev, "<%s>\n", __func__);
@@ -1327,8 +1326,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
if (!i2c_imx)
return -ENOMEM;
- match = device_get_match_data(&pdev->dev);
- i2c_imx->hwdata = match;
+ i2c_imx->hwdata = device_get_match_data(&pdev->dev);
/* Setup i2c_imx driver structure */
strlcpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name));
--
2.17.1
next prev parent reply other threads:[~2021-01-19 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 0:31 [PATCH] i2c: imx: Remove unused .id_table support Fabio Estevam
2021-01-19 0:31 ` Fabio Estevam [this message]
2021-01-19 8:47 ` Sascha Hauer
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=20210119003148.1793614-2-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=wsa@kernel.org \
/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: link
Be 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).