diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-29 19:17:59 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-10-31 18:37:13 -0400 |
commit | c34f7c696211e3d45ff94a34824b65aa52576bc6 (patch) | |
tree | 81327c2b471e51e47171ed11e57c99eda552a0ef /arch/arm/mach-omap1/i2c.c | |
parent | bb77209432873214a796a70a4539e4ebdf3feb54 (diff) |
ARM: OMAP: Make plat-omap/i2c.c port checks local
The common code should not have any omap1 or omap2+
specific code, and should not need to call the cpu_is_omap
macros.
The only remaining user for cpu_is_omap macros is
omap_i2c_nr_ports(). Let's make those checks in
the omap specific implementation of omap_i2c_add_bus()
instead in order to remove cpu_is_omap usage from
the common code.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/i2c.c')
-rw-r--r-- | arch/arm/mach-omap1/i2c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index 32bcbb8d6c73..54097a29f432 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c | |||
@@ -54,6 +54,9 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata, | |||
54 | struct platform_device *pdev; | 54 | struct platform_device *pdev; |
55 | struct resource *res; | 55 | struct resource *res; |
56 | 56 | ||
57 | if (bus_id > 1) | ||
58 | return -EINVAL; | ||
59 | |||
57 | omap1_i2c_mux_pins(bus_id); | 60 | omap1_i2c_mux_pins(bus_id); |
58 | 61 | ||
59 | pdev = &omap_i2c_devices[bus_id - 1]; | 62 | pdev = &omap_i2c_devices[bus_id - 1]; |