Skip to content

Commit 04a2c2e

Browse files
committed
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
2 parents bc52497 + f6adc9f commit 04a2c2e

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎arch/arm/mach-davinci/devices-da8xx.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,11 +1106,8 @@ int __init da850_register_sata(unsigned long refclkpn)
11061106

11071107
static struct regmap *da8xx_cfgchip;
11081108

1109-
/* regmap doesn't make a copy of this, so we need to keep the pointer around */
1110-
static const char da8xx_cfgchip_name[] = "cfgchip";
1111-
11121109
static const struct regmap_config da8xx_cfgchip_config __initconst = {
1113-
.name = da8xx_cfgchip_name,
1110+
.name = "cfgchip",
11141111
.reg_bits = 32,
11151112
.val_bits = 32,
11161113
.reg_stride = 4,

‎arch/arm/mach-davinci/usb-da8xx.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
static struct clk *usb20_clk;
2828

29+
static struct da8xx_usb_phy_platform_data da8xx_usb_phy_pdata;
30+
2931
static struct platform_device da8xx_usb_phy = {
3032
.name = "da8xx-usb-phy",
3133
.id = -1,
@@ -36,15 +38,13 @@ static struct platform_device da8xx_usb_phy = {
3638
* registered yet.
3739
*/
3840
.init_name = "da8xx-usb-phy",
41+
.platform_data = &da8xx_usb_phy_pdata,
3942
},
4043
};
4144

4245
int __init da8xx_register_usb_phy(void)
4346
{
44-
struct da8xx_usb_phy_platform_data pdata;
45-
46-
pdata.cfgchip = da8xx_get_cfgchip();
47-
da8xx_usb_phy.dev.platform_data = &pdata;
47+
da8xx_usb_phy_pdata.cfgchip = da8xx_get_cfgchip();
4848

4949
return platform_device_register(&da8xx_usb_phy);
5050
}

0 commit comments

Comments
 (0)