aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/hwspinlock.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/hwspinlock.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/hwspinlock.c')
-rw-r--r--arch/arm/mach-omap2/hwspinlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c
index 06d4a80660a5..0b3ae9d9c3b3 100644
--- a/arch/arm/mach-omap2/hwspinlock.c
+++ b/arch/arm/mach-omap2/hwspinlock.c
@@ -35,7 +35,7 @@ int __init hwspinlocks_init(void)
35{ 35{
36 int retval = 0; 36 int retval = 0;
37 struct omap_hwmod *oh; 37 struct omap_hwmod *oh;
38 struct omap_device *od; 38 struct platform_device *pdev;
39 const char *oh_name = "spinlock"; 39 const char *oh_name = "spinlock";
40 const char *dev_name = "omap_hwspinlock"; 40 const char *dev_name = "omap_hwspinlock";
41 41
@@ -48,13 +48,13 @@ int __init hwspinlocks_init(void)
48 if (oh == NULL) 48 if (oh == NULL)
49 return -EINVAL; 49 return -EINVAL;
50 50
51 od = omap_device_build(dev_name, 0, oh, NULL, 0, 51 pdev = omap_device_build(dev_name, 0, oh, NULL, 0,
52 omap_spinlock_latency, 52 omap_spinlock_latency,
53 ARRAY_SIZE(omap_spinlock_latency), false); 53 ARRAY_SIZE(omap_spinlock_latency), false);
54 if (IS_ERR(od)) { 54 if (IS_ERR(pdev)) {
55 pr_err("Can't build omap_device for %s:%s\n", dev_name, 55 pr_err("Can't build omap_device for %s:%s\n", dev_name,
56 oh_name); 56 oh_name);
57 retval = PTR_ERR(od); 57 retval = PTR_ERR(pdev);
58 } 58 }
59 59
60 return retval; 60 return retval;