diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-31 06:23:08 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-31 06:23:08 -1000 |
commit | f33c596a2f921696391801b637ed50d514634079 (patch) | |
tree | abc353fe3ef128e60e20a6b73f52858ce6d39eff /drivers | |
parent | 250f8e3db646028353a2a737ddb7a894c97a1098 (diff) | |
parent | 74411c04540404a1ff29d254584ef393e150aeda (diff) | |
download | linux-3.10-f33c596a2f921696391801b637ed50d514634079.tar.gz linux-3.10-f33c596a2f921696391801b637ed50d514634079.tar.bz2 linux-3.10-f33c596a2f921696391801b637ed50d514634079.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
smc91c92_cs.c: fix bogus compiler warning
orinoco_cs: be more careful when matching cards with ID 0x0156:0x0002
hostap_cs: support cards with "Version 01.02" as third product ID
pcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3
pxa2xx pcmcia - stargate 2 use gpio array.
pcmcia: pxa2xx: remove empty socket_init / socket_resume functions.
drivers:pcmcia:soc_common: make socket_init and socket_suspend optional
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 5 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_balloon3.c | 10 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x255.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x270.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_colibri.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_mainstone.c | 10 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmld.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmtc.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmtx.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_stargate2.c | 34 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_viper.c | 10 | ||||
-rw-r--r-- | drivers/pcmcia/soc_common.c | 7 |
14 files changed, 22 insertions, 124 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 1cd9394c335..cffbc0373fa 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c @@ -809,7 +809,7 @@ static int smc91c92_config(struct pcmcia_device *link) struct net_device *dev = link->priv; struct smc_private *smc = netdev_priv(dev); char *name; - int i, j, rev; + int i, rev, j = 0; unsigned int ioaddr; u_long mir; diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index c052a0d5cbd..5441ad19511 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -648,6 +648,8 @@ static const struct pcmcia_device_id hostap_cs_ids[] = { 0x74c5e40d), PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil", 0x4b801a17), + PCMCIA_DEVICE_MANF_CARD_PROD_ID3(0x0156, 0x0002, "Version 01.02", + 0x4b74baa0), PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), PCMCIA_DEVICE_PROD_ID123( diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 3f7fc4a0b43..d7dbc00bcfb 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c @@ -239,7 +239,6 @@ static int orinoco_cs_resume(struct pcmcia_device *link) static const struct pcmcia_device_id orinoco_cs_ids[] = { PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */ - PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */ PCMCIA_DEVICE_MANF_CARD(0x016b, 0x0001), /* Ericsson WLAN Card C11 */ PCMCIA_DEVICE_MANF_CARD(0x01eb, 0x080a), /* Nortel Networks eMobility 802.11 Wireless Adapter */ PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), /* AirWay 802.11 Adapter (PCMCIA) */ @@ -272,6 +271,7 @@ static const struct pcmcia_device_id orinoco_cs_ids[] = { PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e), + PCMCIA_DEVICE_MANF_CARD_PROD_ID3(0x0156, 0x0002, "Version 01.01", 0xd27deb1a), /* Lucent Orinoco */ #ifdef CONFIG_HERMES_PRISM /* Only entries that certainly identify Prism chipset */ PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100), /* SonicWALL Long Range Wireless Card */ @@ -321,6 +321,9 @@ static const struct pcmcia_device_id orinoco_cs_ids[] = { PCMCIA_DEVICE_PROD_ID3("ISL37100P", 0x630d52b2), PCMCIA_DEVICE_PROD_ID3("ISL37101P-10", 0xdd97a26b), PCMCIA_DEVICE_PROD_ID3("ISL37300P", 0xc9049a39), + + /* This may be Agere or Intersil Firmware */ + PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), #endif PCMCIA_DEVICE_NULL, }; diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c index 4c3e94c0ae8..f56d7de7c75 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/drivers/pcmcia/pxa2xx_balloon3.c @@ -103,22 +103,12 @@ static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void balloon3_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void balloon3_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level balloon3_pcmcia_ops = { .owner = THIS_MODULE, .hw_init = balloon3_pcmcia_hw_init, .hw_shutdown = balloon3_pcmcia_hw_shutdown, .socket_state = balloon3_pcmcia_socket_state, .configure_socket = balloon3_pcmcia_configure_socket, - .socket_init = balloon3_pcmcia_socket_init, - .socket_suspend = balloon3_pcmcia_socket_suspend, .first = 0, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c index 05913d0bbdb..63f4d5211ed 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/drivers/pcmcia/pxa2xx_cm_x255.c @@ -102,23 +102,12 @@ static int cmx255_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void cmx255_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void cmx255_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - - static struct pcmcia_low_level cmx255_pcmcia_ops __initdata = { .owner = THIS_MODULE, .hw_init = cmx255_pcmcia_hw_init, .hw_shutdown = cmx255_pcmcia_shutdown, .socket_state = cmx255_pcmcia_socket_state, .configure_socket = cmx255_pcmcia_configure_socket, - .socket_init = cmx255_pcmcia_socket_init, - .socket_suspend = cmx255_pcmcia_socket_suspend, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index 5662646b84d..6ee42b4c3e6 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c @@ -82,23 +82,12 @@ static int cmx270_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void cmx270_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void cmx270_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - - static struct pcmcia_low_level cmx270_pcmcia_ops __initdata = { .owner = THIS_MODULE, .hw_init = cmx270_pcmcia_hw_init, .hw_shutdown = cmx270_pcmcia_shutdown, .socket_state = cmx270_pcmcia_socket_state, .configure_socket = cmx270_pcmcia_configure_socket, - .socket_init = cmx270_pcmcia_socket_init, - .socket_suspend = cmx270_pcmcia_socket_suspend, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c index 443cb7fc872..c6dec572a05 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/drivers/pcmcia/pxa2xx_colibri.c @@ -116,14 +116,6 @@ colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level colibri_pcmcia_ops = { .owner = THIS_MODULE, @@ -135,9 +127,6 @@ static struct pcmcia_low_level colibri_pcmcia_ops = { .socket_state = colibri_pcmcia_socket_state, .configure_socket = colibri_pcmcia_configure_socket, - - .socket_init = colibri_pcmcia_socket_init, - .socket_suspend = colibri_pcmcia_socket_suspend, }; static struct platform_device *colibri_pcmcia_device; diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 92016fe932b..aded706c0b9 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c @@ -128,22 +128,12 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return ret; } -static void mst_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void mst_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level mst_pcmcia_ops __initdata = { .owner = THIS_MODULE, .hw_init = mst_pcmcia_hw_init, .hw_shutdown = mst_pcmcia_hw_shutdown, .socket_state = mst_pcmcia_socket_state, .configure_socket = mst_pcmcia_configure_socket, - .socket_init = mst_pcmcia_socket_init, - .socket_suspend = mst_pcmcia_socket_suspend, .nr = 2, }; diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c index 69f73670949..d589ad1dcd4 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/drivers/pcmcia/pxa2xx_palmld.c @@ -65,14 +65,6 @@ static int palmld_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void palmld_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void palmld_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level palmld_pcmcia_ops = { .owner = THIS_MODULE, @@ -84,9 +76,6 @@ static struct pcmcia_low_level palmld_pcmcia_ops = { .socket_state = palmld_pcmcia_socket_state, .configure_socket = palmld_pcmcia_configure_socket, - - .socket_init = palmld_pcmcia_socket_init, - .socket_suspend = palmld_pcmcia_socket_suspend, }; static struct platform_device *palmld_pcmcia_device; diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index d0ad6a76bbd..9c6a04b2f71 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c @@ -117,14 +117,6 @@ static int palmtc_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return ret; } -static void palmtc_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void palmtc_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level palmtc_pcmcia_ops = { .owner = THIS_MODULE, @@ -136,9 +128,6 @@ static struct pcmcia_low_level palmtc_pcmcia_ops = { .socket_state = palmtc_pcmcia_socket_state, .configure_socket = palmtc_pcmcia_configure_socket, - - .socket_init = palmtc_pcmcia_socket_init, - .socket_suspend = palmtc_pcmcia_socket_suspend, }; static struct platform_device *palmtc_pcmcia_device; diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c index 1a258045040..80645a688ee 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/drivers/pcmcia/pxa2xx_palmtx.c @@ -67,14 +67,6 @@ palmtx_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void palmtx_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void palmtx_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level palmtx_pcmcia_ops = { .owner = THIS_MODULE, @@ -86,9 +78,6 @@ static struct pcmcia_low_level palmtx_pcmcia_ops = { .socket_state = palmtx_pcmcia_socket_state, .configure_socket = palmtx_pcmcia_configure_socket, - - .socket_init = palmtx_pcmcia_socket_init, - .socket_suspend = palmtx_pcmcia_socket_suspend, }; static struct platform_device *palmtx_pcmcia_device; diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c index d08802fe35f..939622251df 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/drivers/pcmcia/pxa2xx_stargate2.c @@ -28,7 +28,6 @@ #include "soc_common.h" -#define SG2_S0_BUFF_CTL 120 #define SG2_S0_POWER_CTL 108 #define SG2_S0_GPIO_RESET 82 #define SG2_S0_GPIO_DETECT 53 @@ -38,6 +37,11 @@ static struct pcmcia_irqs irqs[] = { { 0, IRQ_GPIO(SG2_S0_GPIO_DETECT), "PCMCIA0 CD" }, }; +static struct gpio sg2_pcmcia_gpios[] = { + { SG2_S0_GPIO_RESET, GPIOF_OUT_INIT_HIGH, "PCMCIA Reset" }, + { SG2_S0_POWER_CTL, GPIOF_OUT_INIT_HIGH, "PCMCIA Power Ctrl" }, +}; + static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { skt->socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); @@ -122,37 +126,23 @@ static int __init sg2_pcmcia_init(void) if (!sg2_pcmcia_device) return -ENOMEM; - ret = gpio_request(SG2_S0_BUFF_CTL, "SG2 CF buff ctl"); + ret = gpio_request_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); if (ret) goto error_put_platform_device; - ret = gpio_request(SG2_S0_POWER_CTL, "SG2 CF power ctl"); - if (ret) - goto error_free_gpio_buff_ctl; - ret = gpio_request(SG2_S0_GPIO_RESET, "SG2 CF reset"); - if (ret) - goto error_free_gpio_power_ctl; - /* Set gpio directions */ - gpio_direction_output(SG2_S0_BUFF_CTL, 0); - gpio_direction_output(SG2_S0_POWER_CTL, 1); - gpio_direction_output(SG2_S0_GPIO_RESET, 1); ret = platform_device_add_data(sg2_pcmcia_device, &sg2_pcmcia_ops, sizeof(sg2_pcmcia_ops)); if (ret) - goto error_free_gpio_reset; + goto error_free_gpios; ret = platform_device_add(sg2_pcmcia_device); if (ret) - goto error_free_gpio_reset; + goto error_free_gpios; return 0; -error_free_gpio_reset: - gpio_free(SG2_S0_GPIO_RESET); -error_free_gpio_power_ctl: - gpio_free(SG2_S0_POWER_CTL); -error_free_gpio_buff_ctl: - gpio_free(SG2_S0_BUFF_CTL); +error_free_gpios: + gpio_free_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); error_put_platform_device: platform_device_put(sg2_pcmcia_device); @@ -162,9 +152,7 @@ error_put_platform_device: static void __exit sg2_pcmcia_exit(void) { platform_device_unregister(sg2_pcmcia_device); - gpio_free(SG2_S0_BUFF_CTL); - gpio_free(SG2_S0_POWER_CTL); - gpio_free(SG2_S0_GPIO_RESET); + gpio_free_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); } fs_initcall(sg2_pcmcia_init); diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c index a51f2077644..1064b1c2869 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/drivers/pcmcia/pxa2xx_viper.c @@ -136,22 +136,12 @@ static int viper_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void viper_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void viper_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level viper_pcmcia_ops = { .owner = THIS_MODULE, .hw_init = viper_pcmcia_hw_init, .hw_shutdown = viper_pcmcia_hw_shutdown, .socket_state = viper_pcmcia_socket_state, .configure_socket = viper_pcmcia_configure_socket, - .socket_init = viper_pcmcia_socket_init, - .socket_suspend = viper_pcmcia_socket_suspend, .nr = 1, }; diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 768f9572a8c..a0a9c2aa8d7 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -186,8 +186,8 @@ static int soc_common_pcmcia_sock_init(struct pcmcia_socket *sock) struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock); debug(skt, 2, "initializing socket\n"); - - skt->ops->socket_init(skt); + if (skt->ops->socket_init) + skt->ops->socket_init(skt); return 0; } @@ -207,7 +207,8 @@ static int soc_common_pcmcia_suspend(struct pcmcia_socket *sock) debug(skt, 2, "suspending socket\n"); - skt->ops->socket_suspend(skt); + if (skt->ops->socket_suspend) + skt->ops->socket_suspend(skt); return 0; } |