mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
6d65f5ea2b
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.133
Removed upstreamed:
bcm47xx/patches-5.15/101-v5.18-mtd-rawnand-brcmnand-Allow-SoC-to-provide-I-O-operations.patch[1]
Cherry picked build fix.[2] All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.133&id=56cf9f446b331414a15ef0e8dedf23583ec2c427
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.15/fix-up-backport-of-136191703038-interconnect-teach-l.patch
Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 89895937dd
)
53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From: Florian Fainelli <f.fainelli@gmail.com>
|
|
Subject: [PATCH v3 3/9] mtd: rawnand: brcmnand: Avoid pdev in brcmnand_init_cs()
|
|
Date: Fri, 07 Jan 2022 10:46:08 -0800
|
|
Content-Type: text/plain; charset="utf-8"
|
|
|
|
In preparation for encapsulating more of what the loop calling
|
|
brcmnand_init_cs() does, avoid using platform_device when it is the
|
|
device behind platform_device that we are using for printing errors.
|
|
|
|
No functional changes introduced.
|
|
|
|
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
---
|
|
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
@@ -2814,7 +2814,7 @@ static const struct nand_controller_ops
|
|
static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
|
|
{
|
|
struct brcmnand_controller *ctrl = host->ctrl;
|
|
- struct platform_device *pdev = host->pdev;
|
|
+ struct device *dev = ctrl->dev;
|
|
struct mtd_info *mtd;
|
|
struct nand_chip *chip;
|
|
int ret;
|
|
@@ -2822,7 +2822,7 @@ static int brcmnand_init_cs(struct brcmn
|
|
|
|
ret = of_property_read_u32(dn, "reg", &host->cs);
|
|
if (ret) {
|
|
- dev_err(&pdev->dev, "can't get chip-select\n");
|
|
+ dev_err(dev, "can't get chip-select\n");
|
|
return -ENXIO;
|
|
}
|
|
|
|
@@ -2831,13 +2831,13 @@ static int brcmnand_init_cs(struct brcmn
|
|
|
|
nand_set_flash_node(chip, dn);
|
|
nand_set_controller_data(chip, host);
|
|
- mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",
|
|
+ mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d",
|
|
host->cs);
|
|
if (!mtd->name)
|
|
return -ENOMEM;
|
|
|
|
mtd->owner = THIS_MODULE;
|
|
- mtd->dev.parent = &pdev->dev;
|
|
+ mtd->dev.parent = dev;
|
|
|
|
chip->legacy.cmd_ctrl = brcmnand_cmd_ctrl;
|
|
chip->legacy.cmdfunc = brcmnand_cmdfunc;
|