Skip to contentSkip to conversation

pxa2xx viper glue code fix + trizeps irrelevant ifdef removal.

PATCH Superseded Jonathan Cameron 2 participants 5 messages Jun 6, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover pxa2xx viper glue code fix + trizeps irrelevant ifdef removal.

The first patch looks like a simple bug.
The second removes an ifdef that doesn't do anything.

I was looking through this code with a vague view to simplifying it. Why do pxa2xx and sa1100 require lots of platform glue when others subarches do not?

On the second one, it looks to me like all those ifdefs could be trivially removed.

Otherwise, a lot of these bits of glue code could be greatly reduced by introducing a few default functions and const structures. Anyone bored enough to do it?

I might carry on dabbling if people familiar with all these boards are happy to review.

Jonathan

Jonathan Cameron (2):
pxa2xx viper: pcmcia - free gpios on exist rather than requesting
them again.
pxa2xx trizeps4: pcmcia remove unnecessary ifdefs

 drivers/pcmcia/pxa2xx_trizeps4.c |    4 ----
 drivers/pcmcia/pxa2xx_vpac270.c  |    4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/2 pxa2xx viper: pcmcia - free gpios on exist rather than requesting them again.

---
 drivers/pcmcia/pxa2xx_vpac270.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/pcmcia/pxa2xx_vpac270.c +2 -2
index 435002d..413dc7d 100644
@@ -75,10 +75,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
 {
 	if (skt->nr == 0)
-		gpio_request_array(vpac270_pcmcia_gpios,
+		gpio_free_array(vpac270_pcmcia_gpios,
 					ARRAY_SIZE(vpac270_pcmcia_gpios));
 	else
-		gpio_request_array(vpac270_cf_gpios,
+		gpio_free_array(vpac270_cf_gpios,
 					ARRAY_SIZE(vpac270_cf_gpios));
 }
 
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 1/2 pxa2xx viper: pcmcia - free gpios on exist rather than requesting them again.

Hi Jonathan,

Quoted 12 lines · Jonathan Cameron
---
  drivers/pcmcia/pxa2xx_vpac270.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
drivers/pcmcia/pxa2xx_vpac270.c +0 -0
index 435002d..413dc7d 100644
@@ -75,10 +75,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
  static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
  {

drivers/pcmcia/pxa2xx_vpac270.c static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) · line 84

Quoted 10 lines
drivers/pcmcia/pxa2xx_vpac270.c +2 -2
  	if (skt->nr == 0)
-		gpio_request_array(vpac270_pcmcia_gpios,
+		gpio_free_array(vpac270_pcmcia_gpios,
  					ARRAY_SIZE(vpac270_pcmcia_gpios));
  	else
-		gpio_request_array(vpac270_cf_gpios,
+		gpio_free_array(vpac270_cf_gpios,
  					ARRAY_SIZE(vpac270_cf_gpios));
  }
 

You may want to update the subject to reflect the fact that you're updating the voipac driver, and not the viper one.

Cheers,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#3 lore raw

PATCH 1/2 pxa2xx viper: pcmcia - free gpios on exist rather than requesting them again.

Quoted 28 lines · Marc Zyngier

Hi Jonathan,

Quoted 12 lines · Jonathan Cameron
---
  drivers/pcmcia/pxa2xx_vpac270.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
drivers/pcmcia/pxa2xx_vpac270.c +0 -0
index 435002d..413dc7d 100644
@@ -75,10 +75,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
  static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
  {

drivers/pcmcia/pxa2xx_vpac270.c static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) · line 84

Quoted 10 lines
drivers/pcmcia/pxa2xx_vpac270.c +2 -2
      if (skt->nr == 0)
-        gpio_request_array(vpac270_pcmcia_gpios,
+        gpio_free_array(vpac270_pcmcia_gpios,
                      ARRAY_SIZE(vpac270_pcmcia_gpios));
      else
-        gpio_request_array(vpac270_cf_gpios,
+        gpio_free_array(vpac270_cf_gpios,
                      ARRAY_SIZE(vpac270_cf_gpios));
  }
 

You may want to update the subject to reflect the fact that you're updating the voipac driver, and not the viper one.

Quoted 1 line

Cheers,

Gah.

Sorry about that will repost in a sec.

Jonathan

#4 lore raw

PATCH 2/2 pxa2xx trizeps4: pcmcia remove unnecessary ifdefs

In reply to Jonathan Cameron
---
 drivers/pcmcia/pxa2xx_trizeps4.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/pcmcia/pxa2xx_trizeps4.c +0 -4
index b829e65..57ddb96 100644
@@ -55,10 +55,6 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 		}
 		skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
 		break;
-
-#ifndef CONFIG_MACH_TRIZEPS_CONXS
-	case 1:
-#endif
 	default:
 		break;
 	}
Signature · 1 line
1.7.3.4