aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/hsmmc.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-21 16:48:45 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 19:35:46 -0400
commit3528c58eb9e818b7821501afa2916eb12131994a (patch)
tree078de60ef5e54b7028220c5cc58c93fe84d8e6b6 /arch/arm/mach-omap2/hsmmc.c
parenta2a28ad9969616fa6d7b243ecf334dc6983992cf (diff)
OMAP: omap_device: when building return platform_device instead of omap_device
All of the device init and device driver interaction with omap_device is done using platform_device pointers. To make this more explicit, have omap_device return a platform_device pointer instead of an omap_device pointer. All current users of the omap_device pointer were only using it to get at the platform_device pointer or struct device pointer, so fixing all of the users was trivial. This also makes it more difficult for device init code to directly access members of struct omap_device, and allows for easier changing of omap_device internals. Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r--arch/arm/mach-omap2/hsmmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9b45c76e1d3..cc8791952a05 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -430,7 +430,7 @@ static struct omap_device_pm_latency omap_hsmmc_latency[] = {
430void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) 430void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
431{ 431{
432 struct omap_hwmod *oh; 432 struct omap_hwmod *oh;
433 struct omap_device *od; 433 struct platform_device *pdev;
434 struct omap_device_pm_latency *ohl; 434 struct omap_device_pm_latency *ohl;
435 char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN]; 435 char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN];
436 struct omap_mmc_platform_data *mmc_data; 436 struct omap_mmc_platform_data *mmc_data;
@@ -471,9 +471,9 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
471 mmc_data->controller_flags = mmc_dev_attr->flags; 471 mmc_data->controller_flags = mmc_dev_attr->flags;
472 } 472 }
473 473
474 od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, 474 pdev = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,
475 sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); 475 sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false);
476 if (IS_ERR(od)) { 476 if (IS_ERR(pdev)) {
477 WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name); 477 WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name);
478 kfree(mmc_data->slots[0].name); 478 kfree(mmc_data->slots[0].name);
479 goto done; 479 goto done;
@@ -482,7 +482,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
482 * return device handle to board setup code 482 * return device handle to board setup code
483 * required to populate for regulator framework structure 483 * required to populate for regulator framework structure
484 */ 484 */
485 hsmmcinfo->dev = &od->pdev.dev; 485 hsmmcinfo->dev = &pdev->dev;
486 486
487done: 487done:
488 kfree(mmc_data); 488 kfree(mmc_data);