projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad8566d
)
mtd: rawnand: mxc: Use device_get_match_data()
author
Fabio Estevam
<festevam@gmail.com>
Fri, 4 Dec 2020 14:58:17 +0000
(11:58 -0300)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Thu, 10 Dec 2020 21:37:33 +0000
(22:37 +0100)
The retrieval of driver data can be a bit simplified by using
device_get_match_data(), so switch to it.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20201204145818.32739-1-festevam@gmail.com
drivers/mtd/nand/raw/mxc_nand.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/raw/mxc_nand.c
b/drivers/mtd/nand/raw/mxc_nand.c
index f896364968d85f9a04b5fbf4929c8001da39433c..d5c445eb93adedd8c0dfc8583abbe72c48a04d14 100644
(file)
--- a/
drivers/mtd/nand/raw/mxc_nand.c
+++ b/
drivers/mtd/nand/raw/mxc_nand.c
@@
-1714,7
+1714,6
@@
static const struct nand_controller_ops mxcnd_controller_ops = {
static int mxcnd_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id;
struct nand_chip *this;
struct mtd_info *mtd;
struct mxc_nand_host *host;
@@
-1756,8
+1755,7
@@
static int mxcnd_probe(struct platform_device *pdev)
if (IS_ERR(host->clk))
return PTR_ERR(host->clk);
- of_id = of_match_device(mxcnd_dt_ids, host->dev);
- host->devtype_data = of_id->data;
+ host->devtype_data = device_get_match_data(&pdev->dev);
if (!host->devtype_data->setup_interface)
this->options |= NAND_KEEP_TIMINGS;