aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/display.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/display.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/display.c')
-rw-r--r--arch/arm/mach-omap2/display.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index a5b7a236aa5b..18693f6de041 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -78,7 +78,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
78{ 78{
79 int r = 0; 79 int r = 0;
80 struct omap_hwmod *oh; 80 struct omap_hwmod *oh;
81 struct omap_device *od; 81 struct platform_device *pdev;
82 int i, oh_count; 82 int i, oh_count;
83 struct omap_display_platform_data pdata; 83 struct omap_display_platform_data pdata;
84 const struct omap_dss_hwmod_data *curr_dss_hwmod; 84 const struct omap_dss_hwmod_data *curr_dss_hwmod;
@@ -108,13 +108,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
108 return -ENODEV; 108 return -ENODEV;
109 } 109 }
110 110
111 od = omap_device_build(curr_dss_hwmod[i].dev_name, 111 pdev = omap_device_build(curr_dss_hwmod[i].dev_name,
112 curr_dss_hwmod[i].id, oh, &pdata, 112 curr_dss_hwmod[i].id, oh, &pdata,
113 sizeof(struct omap_display_platform_data), 113 sizeof(struct omap_display_platform_data),
114 omap_dss_latency, 114 omap_dss_latency,
115 ARRAY_SIZE(omap_dss_latency), 0); 115 ARRAY_SIZE(omap_dss_latency), 0);
116 116
117 if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n", 117 if (WARN((IS_ERR(pdev)), "Could not build omap_device for %s\n",
118 curr_dss_hwmod[i].oh_name)) 118 curr_dss_hwmod[i].oh_name))
119 return -ENODEV; 119 return -ENODEV;
120 } 120 }