Skip to content

Commit

Permalink
ARM: OMAP2+: omap_device: remove obsolete pm_lats and early_device code
Browse files Browse the repository at this point in the history
Remove now-obsolete code from arch/arm/mach-omap2/omap_device.c.  This
mostly consists of removing the first attempt at device PM latency
handling.  This was never really used, has been replaced by the common
dev_pm_qos code, and needs to go away as part of the DT conversion.
Also, the early platform_device creation code has been removed, as it
appears to be unused.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Paul Walmsley committed Jan 26, 2013
1 parent 949db15 commit c1d1cd5
Show file tree
Hide file tree
Showing 24 changed files with 99 additions and 610 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/am35xx-emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static int __init omap_davinci_emac_dev_init(struct omap_hwmod *oh,
struct platform_device *pdev;

pdev = omap_device_build(oh->class->name, 0, oh, pdata, pdata_len,
NULL, 0, false);
false);
if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n",
oh->class->name, oh->name);
Expand Down
25 changes: 10 additions & 15 deletions arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ static int __init omap3_l3_init(void)
if (!oh)
pr_err("could not look up %s\n", oh_name);

pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0,
NULL, 0, 0);
pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0);

WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

Expand Down Expand Up @@ -96,8 +95,7 @@ static int __init omap4_l3_init(void)
pr_err("could not look up %s\n", oh_name);
}

pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL,
0, NULL, 0, 0);
pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, 0);

WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

Expand Down Expand Up @@ -273,7 +271,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
keypad_data = sdp4430_keypad_data;

pdev = omap_device_build(name, id, oh, keypad_data,
sizeof(struct omap4_keypad_platform_data), NULL, 0, 0);
sizeof(struct omap4_keypad_platform_data));

if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n",
Expand All @@ -297,7 +295,7 @@ static inline void __init omap_init_mbox(void)
return;
}

pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
__func__, PTR_ERR(pdev));
}
Expand Down Expand Up @@ -337,7 +335,7 @@ static void __init omap_init_mcpdm(void)
return;
}

pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
}
#else
Expand All @@ -358,7 +356,7 @@ static void __init omap_init_dmic(void)
return;
}

pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
}
#else
Expand All @@ -384,8 +382,7 @@ static void __init omap_init_hdmi_audio(void)
return;
}

pdev = omap_device_build("omap-hdmi-audio-dai",
-1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0, 0);
WARN(IS_ERR(pdev),
"Can't build omap_device for omap-hdmi-audio-dai.\n");

Expand Down Expand Up @@ -429,8 +426,7 @@ static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
}

spi_num++;
pdev = omap_device_build(name, spi_num, oh, pdata,
sizeof(*pdata), NULL, 0, 0);
pdev = omap_device_build(name, spi_num, oh, pdata, sizeof(*pdata));
WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n",
name, oh->name);
kfree(pdata);
Expand Down Expand Up @@ -460,7 +456,7 @@ static void omap_init_rng(void)
if (!oh)
return;

pdev = omap_device_build("omap_rng", -1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build("omap_rng", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n");
}

Expand Down Expand Up @@ -689,8 +685,7 @@ static void __init omap_init_ocp2scp(void)

pdata->dev_cnt = dev_cnt;

pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata), NULL,
0, false);
pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata));
if (IS_ERR(pdev)) {
pr_err("Could not build omap_device for %s %s\n",
name, oh_name);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static struct platform_device *create_dss_pdev(const char *pdev_name,
dev_set_name(&pdev->dev, "%s", pdev->name);

ohs[0] = oh;
od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
od = omap_device_alloc(pdev, ohs, 1);
if (IS_ERR(od)) {
pr_err("Could not alloc omap_device for %s\n", pdev_name);
r = -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)

p->errata = configure_dma_errata();

pdev = omap_device_build(name, 0, oh, p, sizeof(*p), NULL, 0, 0);
pdev = omap_device_build(name, 0, oh, p, sizeof(*p));
kfree(p);
if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n",
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ static int __init omap_init_drm(void)
oh = omap_hwmod_lookup("dmm");

if (oh) {
pdev = omap_device_build(oh->name, -1, oh, NULL, 0, NULL, 0,
false);
pdev = omap_device_build(oh->name, -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Could not build omap_device for %s\n",
oh->name);
}
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
pwrdm = omap_hwmod_get_pwrdm(oh);
pdata->loses_context = pwrdm_can_ever_lose_context(pwrdm);

pdev = omap_device_build(name, id - 1, oh, pdata,
sizeof(*pdata), NULL, 0, false);
pdev = omap_device_build(name, id - 1, oh, pdata, sizeof(*pdata));
kfree(pdata);

if (IS_ERR(pdev)) {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ static int __init omap_gpmc_init(void)
return -ENODEV;
}

pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);

return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/hdq1w.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static int __init omap_init_hdq(void)
if (!oh)
return 0;

pdev = omap_device_build(devname, id, oh, NULL, 0, NULL, 0, 0);
pdev = omap_device_build(devname, id, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
devname, oh->name);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
}
dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);

od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
od = omap_device_alloc(pdev, ohs, 1);
if (IS_ERR(od)) {
pr_err("Could not allocate od for %s\n", name);
goto put_pdev;
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/hwspinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ static int __init hwspinlocks_init(void)
return -EINVAL;

pdev = omap_device_build(dev_name, 0, oh, &omap_hwspinlock_pdata,
sizeof(struct hwspinlock_pdata),
NULL, 0, false);
sizeof(struct hwspinlock_pdata));
if (IS_ERR(pdev)) {
pr_err("Can't build omap_device for %s:%s\n", dev_name,
oh_name);
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
if (cpu_is_omap34xx())
pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
pdev = omap_device_build(name, bus_id, oh, pdata,
sizeof(struct omap_i2c_bus_platform_data),
NULL, 0, 0);
sizeof(struct omap_i2c_bus_platform_data));
WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", name);

return PTR_RET(pdev);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
count++;
}
pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
sizeof(*pdata), NULL, 0, false);
sizeof(*pdata));
kfree(pdata);
if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n", __func__,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/msdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
return;
}
pdev = omap_device_build(dev_name, id, oh, mmc_data[0],
sizeof(struct omap_mmc_platform_data), NULL, 0, 0);
sizeof(struct omap_mmc_platform_data));
if (IS_ERR(pdev))
WARN(1, "Can'd build omap_device for %s:%s.\n",
dev_name, oh->name);
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/omap-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ static int __init omap_iommu_dev_init(struct omap_hwmod *oh, void *unused)
pdata->deassert_reset = omap_device_deassert_hardreset;
}

pdev = omap_device_build("omap-iommu", i, oh, pdata, sizeof(*pdata),
NULL, 0, 0);
pdev = omap_device_build("omap-iommu", i, oh, pdata, sizeof(*pdata));

kfree(pdata);

Expand Down
Loading

0 comments on commit c1d1cd5

Please sign in to comment.