aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-04-05 05:09:02 -0400
committerArnd Bergmann <arnd@arndb.de>2018-04-05 05:09:02 -0400
commit04a2c2efbfefa492eb7e00187dc8848924230dca (patch)
tree8b1cb27a82dad451b5192df932c9ff7b8fa3c897
parentbc52497a595d2246923749177d99e4216703b0f4 (diff)
parentf6adc9fd1ff9bbe766cbb68e84a0d97f54a4f436 (diff)
Merge tag 'davinci-for-v4.17/soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc
Pull "DaVinci SoC update fixes for v4.17" from Sekhar Nori: A fix and a clean-up patch for content previously queued for v4.17. * tag 'davinci-for-v4.17/soc-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da8xx: simplify CFGCHIP regmap_config ARM: davinci: da8xx: fix oops in USB PHY driver due to stack allocated platform_data
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c5
-rw-r--r--arch/arm/mach-davinci/usb-da8xx.c8
2 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 24422ba07cc7..78390c64e6ca 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -1106,11 +1106,8 @@ int __init da850_register_sata(unsigned long refclkpn)
1106 1106
1107static struct regmap *da8xx_cfgchip; 1107static struct regmap *da8xx_cfgchip;
1108 1108
1109/* regmap doesn't make a copy of this, so we need to keep the pointer around */
1110static const char da8xx_cfgchip_name[] = "cfgchip";
1111
1112static const struct regmap_config da8xx_cfgchip_config __initconst = { 1109static const struct regmap_config da8xx_cfgchip_config __initconst = {
1113 .name = da8xx_cfgchip_name, 1110 .name = "cfgchip",
1114 .reg_bits = 32, 1111 .reg_bits = 32,
1115 .val_bits = 32, 1112 .val_bits = 32,
1116 .reg_stride = 4, 1113 .reg_stride = 4,
diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
index 4d89d86ce7e5..50445f0e98de 100644
--- a/arch/arm/mach-davinci/usb-da8xx.c
+++ b/arch/arm/mach-davinci/usb-da8xx.c
@@ -26,6 +26,8 @@
26 26
27static struct clk *usb20_clk; 27static struct clk *usb20_clk;
28 28
29static struct da8xx_usb_phy_platform_data da8xx_usb_phy_pdata;
30
29static struct platform_device da8xx_usb_phy = { 31static struct platform_device da8xx_usb_phy = {
30 .name = "da8xx-usb-phy", 32 .name = "da8xx-usb-phy",
31 .id = -1, 33 .id = -1,
@@ -36,15 +38,13 @@ static struct platform_device da8xx_usb_phy = {
36 * registered yet. 38 * registered yet.
37 */ 39 */
38 .init_name = "da8xx-usb-phy", 40 .init_name = "da8xx-usb-phy",
41 .platform_data = &da8xx_usb_phy_pdata,
39 }, 42 },
40}; 43};
41 44
42int __init da8xx_register_usb_phy(void) 45int __init da8xx_register_usb_phy(void)
43{ 46{
44 struct da8xx_usb_phy_platform_data pdata; 47 da8xx_usb_phy_pdata.cfgchip = da8xx_get_cfgchip();
45
46 pdata.cfgchip = da8xx_get_cfgchip();
47 da8xx_usb_phy.dev.platform_data = &pdata;
48 48
49 return platform_device_register(&da8xx_usb_phy); 49 return platform_device_register(&da8xx_usb_phy);
50} 50}