aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/i2c.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/plat-omap/i2c.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/plat-omap/i2c.c')
-rw-r--r--arch/arm/plat-omap/i2c.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 3341ca4703e9..0c7caf2458b4 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -135,7 +135,7 @@ static inline int omap2_i2c_add_bus(int bus_id)
135{ 135{
136 int l; 136 int l;
137 struct omap_hwmod *oh; 137 struct omap_hwmod *oh;
138 struct omap_device *od; 138 struct platform_device *pdev;
139 char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN]; 139 char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN];
140 struct omap_i2c_bus_platform_data *pdata; 140 struct omap_i2c_bus_platform_data *pdata;
141 141
@@ -160,12 +160,12 @@ static inline int omap2_i2c_add_bus(int bus_id)
160 */ 160 */
161 if (cpu_is_omap34xx()) 161 if (cpu_is_omap34xx())
162 pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat; 162 pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
163 od = omap_device_build(name, bus_id, oh, pdata, 163 pdev = omap_device_build(name, bus_id, oh, pdata,
164 sizeof(struct omap_i2c_bus_platform_data), 164 sizeof(struct omap_i2c_bus_platform_data),
165 omap_i2c_latency, ARRAY_SIZE(omap_i2c_latency), 0); 165 omap_i2c_latency, ARRAY_SIZE(omap_i2c_latency), 0);
166 WARN(IS_ERR(od), "Could not build omap_device for %s\n", name); 166 WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", name);
167 167
168 return PTR_ERR(od); 168 return PTR_ERR(pdev);
169} 169}
170#else 170#else
171static inline int omap2_i2c_add_bus(int bus_id) 171static inline int omap2_i2c_add_bus(int bus_id)