Skip to content

Commit 2eda61a

Browse files
committed
Merge tag 'usb-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus
Peter writes: - Several bug-fixes for cdns3 imx driver - Update Peter Chen and Roger Quadros email address * tag 'usb-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: MAINTAINERS: update Peter Chen's email address MAINTAINERS: Update address for Cadence USB3 driver usb: cdns3: imx: improve driver .remove API usb: cdns3: imx: fix can't create core device the second time issue usb: cdns3: imx: fix writing read-only memory issue
2 parents 7c53f6b + 491b1be commit 2eda61a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,7 +3881,7 @@ F: Documentation/devicetree/bindings/mtd/cadence-nand-controller.txt
38813881
F: drivers/mtd/nand/raw/cadence-nand-controller.c
38823882

38833883
CADENCE USB3 DRD IP DRIVER
3884-
M: Peter Chen <peter.chen@nxp.com>
3884+
M: Peter Chen <peter.chen@kernel.org>
38853885
M: Pawel Laszczak <[email protected]>
38863886
R: Roger Quadros <[email protected]>
38873887
R: Aswath Govindraju <[email protected]>
@@ -4163,7 +4163,7 @@ S: Maintained
41634163
F: Documentation/translations/zh_CN/
41644164

41654165
CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
4166-
M: Peter Chen <[email protected]>
4166+
M: Peter Chen <[email protected]>
41674167
41684168
S: Maintained
41694169
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
@@ -18417,7 +18417,7 @@ F: Documentation/usb/ohci.rst
1841718417
F: drivers/usb/host/ohci*
1841818418

1841918419
USB OTG FSM (Finite State Machine)
18420-
M: Peter Chen <[email protected]>
18420+
M: Peter Chen <[email protected]>
1842118421
1842218422
S: Maintained
1842318423
T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git

drivers/usb/cdns3/cdns3-imx.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ static int cdns_imx_probe(struct platform_device *pdev)
185185
}
186186

187187
data->num_clks = ARRAY_SIZE(imx_cdns3_core_clks);
188-
data->clks = (struct clk_bulk_data *)imx_cdns3_core_clks;
188+
data->clks = devm_kmemdup(dev, imx_cdns3_core_clks,
189+
sizeof(imx_cdns3_core_clks), GFP_KERNEL);
190+
if (!data->clks)
191+
return -ENOMEM;
192+
189193
ret = devm_clk_bulk_get(dev, data->num_clks, data->clks);
190194
if (ret)
191195
return ret;
@@ -214,20 +218,16 @@ static int cdns_imx_probe(struct platform_device *pdev)
214218
return ret;
215219
}
216220

217-
static int cdns_imx_remove_core(struct device *dev, void *data)
218-
{
219-
struct platform_device *pdev = to_platform_device(dev);
220-
221-
platform_device_unregister(pdev);
222-
223-
return 0;
224-
}
225-
226221
static int cdns_imx_remove(struct platform_device *pdev)
227222
{
228223
struct device *dev = &pdev->dev;
224+
struct cdns_imx *data = dev_get_drvdata(dev);
229225

230-
device_for_each_child(dev, NULL, cdns_imx_remove_core);
226+
pm_runtime_get_sync(dev);
227+
of_platform_depopulate(dev);
228+
clk_bulk_disable_unprepare(data->num_clks, data->clks);
229+
pm_runtime_disable(dev);
230+
pm_runtime_put_noidle(dev);
231231
platform_set_drvdata(pdev, NULL);
232232

233233
return 0;

0 commit comments

Comments
 (0)