diff options
author | Kevin Hilman <khilman@ti.com> | 2011-07-21 13:48:45 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 16:35:46 -0700 |
commit | 3528c58eb9e818b7821501afa2916eb12131994a (patch) | |
tree | 078de60ef5e54b7028220c5cc58c93fe84d8e6b6 /arch/arm/mach-omap2/hwspinlock.c | |
parent | a2a28ad9969616fa6d7b243ecf334dc6983992cf (diff) | |
download | op-kernel-dev-3528c58eb9e818b7821501afa2916eb12131994a.zip op-kernel-dev-3528c58eb9e818b7821501afa2916eb12131994a.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c index 06d4a80..0b3ae9d 100644 --- a/arch/arm/mach-omap2/hwspinlock.c +++ b/arch/arm/mach-omap2/hwspinlock.c @@ -35,7 +35,7 @@ int __init hwspinlocks_init(void) { int retval = 0; struct omap_hwmod *oh; - struct omap_device *od; + struct platform_device *pdev; const char *oh_name = "spinlock"; const char *dev_name = "omap_hwspinlock"; @@ -48,13 +48,13 @@ int __init hwspinlocks_init(void) if (oh == NULL) return -EINVAL; - od = omap_device_build(dev_name, 0, oh, NULL, 0, + pdev = omap_device_build(dev_name, 0, oh, NULL, 0, omap_spinlock_latency, ARRAY_SIZE(omap_spinlock_latency), false); - if (IS_ERR(od)) { + if (IS_ERR(pdev)) { pr_err("Can't build omap_device for %s:%s\n", dev_name, oh_name); - retval = PTR_ERR(od); + retval = PTR_ERR(pdev); } return retval; |