diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 13:46:56 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 13:46:56 -0700 | 
| commit | 7b6181e06841f5ad15c4ff708b967b4db65a64de (patch) | |
| tree | bdfcf5b74b692f76581156e452d268b64c795200 /arch/arm/mach-omap2/mux.c | |
| parent | 72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (diff) | |
| parent | bc487fb341af05120bccb9f59ce76302391dcc77 (diff) | |
| download | olio-linux-3.10-7b6181e06841f5ad15c4ff708b967b4db65a64de.tar.xz olio-linux-3.10-7b6181e06841f5ad15c4ff708b967b4db65a64de.zip  | |
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits)
  omap: complete removal of machine_desc.io_pg_offst and .phys_io
  omap: UART: fix wakeup registers for OMAP24xx UART2
  omap: Fix spotty MMC voltages
  ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h
  serial: omap-serial: fix signess error
  OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish
  omap: dma: Fix buffering disable bit setting for omap24xx
  omap: serial: Fix the boot-up crash/reboot without CONFIG_PM
  OMAP3: PM: fix scratchpad memory accesses for off-mode
  omap4: pandaboard: enable the ehci port on pandaboard
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: remove unused hsmmc definition
  OMAP: McBSP: Remove null omap44xx ops comment
  OMAP: McBSP: Swap CLKS source definition
  OMAP: McBSP: Fix CLKR and FSR signal muxing
  OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks
  OMAP: control: move plat-omap/control.h to mach-omap2/control.h
  OMAP: split plat-omap/common.c
  OMAP: McBSP: implement functional clock switching via clock framework
  OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c
  ...
Fixed up trivial conflicts in arch/arm/mach-omap2/
{board-zoom-peripherals.c,devices.c} as per Tony
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
| -rw-r--r-- | arch/arm/mach-omap2/mux.c | 23 | 
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index ab403b2ed26..074536ae401 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -23,12 +23,11 @@   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA   *   */ -#include <linux/module.h> +#include <linux/kernel.h>  #include <linux/init.h>  #include <linux/io.h> -#include <linux/slab.h> -#include <linux/spinlock.h>  #include <linux/list.h> +#include <linux/slab.h>  #include <linux/ctype.h>  #include <linux/debugfs.h>  #include <linux/seq_file.h> @@ -36,8 +35,7 @@  #include <asm/system.h> -#include <plat/control.h> - +#include "control.h"  #include "mux.h"  #define OMAP_MUX_BASE_OFFSET		0x30	/* Offset from CTRL_BASE */ @@ -87,7 +85,7 @@ static char *omap_mux_options;  int __init omap_mux_init_gpio(int gpio, int val)  {  	struct omap_mux_entry *e; -	struct omap_mux *gpio_mux; +	struct omap_mux *gpio_mux = NULL;  	u16 old_mode;  	u16 mux_mode;  	int found = 0; @@ -127,17 +125,16 @@ int __init omap_mux_init_gpio(int gpio, int val)  	return 0;  } -int __init omap_mux_init_signal(char *muxname, int val) +int __init omap_mux_init_signal(const char *muxname, int val)  {  	struct omap_mux_entry *e; -	char *m0_name = NULL, *mode_name = NULL; -	int found = 0; +	const char *mode_name; +	int found = 0, mode0_len = 0;  	mode_name = strchr(muxname, '.');  	if (mode_name) { -		*mode_name = '\0'; +		mode0_len = strlen(muxname) - strlen(mode_name);  		mode_name++; -		m0_name = muxname;  	} else {  		mode_name = muxname;  	} @@ -147,9 +144,11 @@ int __init omap_mux_init_signal(char *muxname, int val)  		char *m0_entry = m->muxnames[0];  		int i; -		if (m0_name && strcmp(m0_name, m0_entry)) +		/* First check for full name in mode0.muxmode format */ +		if (mode0_len && strncmp(muxname, m0_entry, mode0_len))  			continue; +		/* Then check for muxmode only */  		for (i = 0; i < OMAP_MUX_NR_MODES; i++) {  			char *mode_cur = m->muxnames[i];  |