aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
committerJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
commitf1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch)
treec2c130a74be25b0b2dff992e1a195e2728bdaadd /drivers/pcmcia
parentfd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff)
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff)
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c1
-rw-r--r--drivers/pcmcia/electra_cf.c9
-rw-r--r--drivers/pcmcia/m8xx_pcmcia.c9
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c17
-rw-r--r--drivers/pcmcia/yenta_socket.c19
5 files changed, 36 insertions, 19 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 7ef7adee5e4f..9fc339845538 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -671,6 +671,7 @@ static void pcmcia_requery(struct pcmcia_socket *s)
671 if (old_funcs != new_funcs) { 671 if (old_funcs != new_funcs) {
672 /* we need to re-start */ 672 /* we need to re-start */
673 pcmcia_card_remove(s, NULL); 673 pcmcia_card_remove(s, NULL);
674 s->functions = 0;
674 pcmcia_card_add(s); 675 pcmcia_card_add(s);
675 } 676 }
676 } 677 }
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 2e59fe947d28..f94d8281cfb0 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -185,7 +185,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev,
185 const struct of_device_id *match) 185 const struct of_device_id *match)
186{ 186{
187 struct device *device = &ofdev->dev; 187 struct device *device = &ofdev->dev;
188 struct device_node *np = ofdev->node; 188 struct device_node *np = ofdev->dev.of_node;
189 struct electra_cf_socket *cf; 189 struct electra_cf_socket *cf;
190 struct resource mem, io; 190 struct resource mem, io;
191 int status; 191 int status;
@@ -357,8 +357,11 @@ static const struct of_device_id electra_cf_match[] = {
357MODULE_DEVICE_TABLE(of, electra_cf_match); 357MODULE_DEVICE_TABLE(of, electra_cf_match);
358 358
359static struct of_platform_driver electra_cf_driver = { 359static struct of_platform_driver electra_cf_driver = {
360 .name = (char *)driver_name, 360 .driver = {
361 .match_table = electra_cf_match, 361 .name = (char *)driver_name,
362 .owner = THIS_MODULE,
363 .of_match_table = electra_cf_match,
364 },
362 .probe = electra_cf_probe, 365 .probe = electra_cf_probe,
363 .remove = electra_cf_remove, 366 .remove = electra_cf_remove,
364}; 367};
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index 41cc954a5ffe..25e5e30a18af 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1157,7 +1157,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
1157 unsigned int i, m, hwirq; 1157 unsigned int i, m, hwirq;
1158 pcmconf8xx_t *pcmcia; 1158 pcmconf8xx_t *pcmcia;
1159 int status; 1159 int status;
1160 struct device_node *np = ofdev->node; 1160 struct device_node *np = ofdev->dev.of_node;
1161 1161
1162 pcmcia_info("%s\n", version); 1162 pcmcia_info("%s\n", version);
1163 1163
@@ -1298,8 +1298,11 @@ static const struct of_device_id m8xx_pcmcia_match[] = {
1298MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); 1298MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
1299 1299
1300static struct of_platform_driver m8xx_pcmcia_driver = { 1300static struct of_platform_driver m8xx_pcmcia_driver = {
1301 .name = driver_name, 1301 .driver = {
1302 .match_table = m8xx_pcmcia_match, 1302 .name = driver_name,
1303 .owner = THIS_MODULE,
1304 .of_match_table = m8xx_pcmcia_match,
1305 },
1303 .probe = m8xx_probe, 1306 .probe = m8xx_probe,
1304 .remove = m8xx_remove, 1307 .remove = m8xx_remove,
1305}; 1308};
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index ef0c5f133691..d007a2a03830 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -813,8 +813,7 @@ static u_int ds_poll(struct file *file, poll_table *wait)
813 813
814/*====================================================================*/ 814/*====================================================================*/
815 815
816static int ds_ioctl(struct inode *inode, struct file *file, 816static int ds_ioctl(struct file *file, u_int cmd, u_long arg)
817 u_int cmd, u_long arg)
818{ 817{
819 struct pcmcia_socket *s; 818 struct pcmcia_socket *s;
820 void __user *uarg = (char __user *)arg; 819 void __user *uarg = (char __user *)arg;
@@ -1021,13 +1020,25 @@ free_out:
1021 return err; 1020 return err;
1022} /* ds_ioctl */ 1021} /* ds_ioctl */
1023 1022
1023static long ds_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1024{
1025 int ret;
1026
1027 lock_kernel();
1028 ret = ds_ioctl(file, cmd, arg);
1029 unlock_kernel();
1030
1031 return ret;
1032}
1033
1034
1024/*====================================================================*/ 1035/*====================================================================*/
1025 1036
1026static const struct file_operations ds_fops = { 1037static const struct file_operations ds_fops = {
1027 .owner = THIS_MODULE, 1038 .owner = THIS_MODULE,
1028 .open = ds_open, 1039 .open = ds_open,
1029 .release = ds_release, 1040 .release = ds_release,
1030 .ioctl = ds_ioctl, 1041 .unlocked_ioctl = ds_unlocked_ioctl,
1031 .read = ds_read, 1042 .read = ds_read,
1032 .write = ds_write, 1043 .write = ds_write,
1033 .poll = ds_poll, 1044 .poll = ds_poll,
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 424e576f3acb..f1d41374eea7 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -880,6 +880,12 @@ static struct cardbus_type cardbus_type[] = {
880 .restore_state = ti_restore_state, 880 .restore_state = ti_restore_state,
881 .sock_init = ti_init, 881 .sock_init = ti_init,
882 }, 882 },
883 [CARDBUS_TYPE_ENE] = {
884 .override = ene_override,
885 .save_state = ti_save_state,
886 .restore_state = ti_restore_state,
887 .sock_init = ti_init,
888 },
883#endif 889#endif
884#ifdef CONFIG_YENTA_RICOH 890#ifdef CONFIG_YENTA_RICOH
885 [CARDBUS_TYPE_RICOH] = { 891 [CARDBUS_TYPE_RICOH] = {
@@ -902,14 +908,6 @@ static struct cardbus_type cardbus_type[] = {
902 .restore_state = o2micro_restore_state, 908 .restore_state = o2micro_restore_state,
903 }, 909 },
904#endif 910#endif
905#ifdef CONFIG_YENTA_TI
906 [CARDBUS_TYPE_ENE] = {
907 .override = ene_override,
908 .save_state = ti_save_state,
909 .restore_state = ti_restore_state,
910 .sock_init = ti_init,
911 },
912#endif
913}; 911};
914 912
915 913
@@ -975,7 +973,7 @@ static irqreturn_t yenta_probe_handler(int irq, void *dev_id)
975/* probes the PCI interrupt, use only on override functions */ 973/* probes the PCI interrupt, use only on override functions */
976static int yenta_probe_cb_irq(struct yenta_socket *socket) 974static int yenta_probe_cb_irq(struct yenta_socket *socket)
977{ 975{
978 u8 reg; 976 u8 reg = 0;
979 977
980 if (!socket->cb_irq) 978 if (!socket->cb_irq)
981 return -1; 979 return -1;
@@ -989,7 +987,8 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
989 } 987 }
990 988
991 /* generate interrupt, wait */ 989 /* generate interrupt, wait */
992 reg = exca_readb(socket, I365_CSCINT); 990 if (!socket->dev->irq)
991 reg = exca_readb(socket, I365_CSCINT);
993 exca_writeb(socket, I365_CSCINT, reg | I365_CSC_STSCHG); 992 exca_writeb(socket, I365_CSCINT, reg | I365_CSC_STSCHG);
994 cb_writel(socket, CB_SOCKET_EVENT, -1); 993 cb_writel(socket, CB_SOCKET_EVENT, -1);
995 cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK); 994 cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);