aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:22:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:22:49 -0500
commitee90f62b3e69d0cd9f8edc6b95f07b1a8c38aaf4 (patch)
tree9ceff60a5db6b98556e1eccd008ecddd470aace9 /drivers
parent70ac551651a2c5a234b703d9a495817f2ca09639 (diff)
parent807277cbf9a240b133ee378a53b65375088ef62a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/cs.c6
-rw-r--r--drivers/pcmcia/ds.c3
-rw-r--r--drivers/pcmcia/i82365.c20
3 files changed, 21 insertions, 8 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 234cdca6fe13..a30aa74304a2 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -513,6 +513,11 @@ static int socket_insert(struct pcmcia_socket *skt)
513 ret = socket_setup(skt, setup_delay); 513 ret = socket_setup(skt, setup_delay);
514 if (ret == CS_SUCCESS) { 514 if (ret == CS_SUCCESS) {
515 skt->state |= SOCKET_PRESENT; 515 skt->state |= SOCKET_PRESENT;
516
517 printk(KERN_NOTICE "pccard: %s card inserted into slot %d\n",
518 (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA",
519 skt->sock);
520
516#ifdef CONFIG_CARDBUS 521#ifdef CONFIG_CARDBUS
517 if (skt->state & SOCKET_CARDBUS) { 522 if (skt->state & SOCKET_CARDBUS) {
518 cb_alloc(skt); 523 cb_alloc(skt);
@@ -598,6 +603,7 @@ static int socket_resume(struct pcmcia_socket *skt)
598 603
599static void socket_remove(struct pcmcia_socket *skt) 604static void socket_remove(struct pcmcia_socket *skt)
600{ 605{
606 printk(KERN_NOTICE "pccard: card ejected from slot %d\n", skt->sock);
601 socket_shutdown(skt); 607 socket_shutdown(skt);
602 cs_socket_put(skt); 608 cs_socket_put(skt);
603} 609}
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 39d096b52926..7f8219f3fd9e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -544,6 +544,9 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
544 list_add_tail(&p_dev->socket_device_list, &s->devices_list); 544 list_add_tail(&p_dev->socket_device_list, &s->devices_list);
545 spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); 545 spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
546 546
547 printk(KERN_NOTICE "pcmcia: registering new device %s\n",
548 p_dev->devname);
549
547 pcmcia_device_query(p_dev); 550 pcmcia_device_query(p_dev);
548 551
549 if (device_register(&p_dev->dev)) { 552 if (device_register(&p_dev->dev)) {
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 4ddd76239b34..4d56bc9926d6 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -1339,10 +1339,7 @@ static struct device_driver i82365_driver = {
1339 .resume = pcmcia_socket_dev_resume, 1339 .resume = pcmcia_socket_dev_resume,
1340}; 1340};
1341 1341
1342static struct platform_device i82365_device = { 1342static struct platform_device *i82365_device;
1343 .name = "i82365",
1344 .id = 0,
1345};
1346 1343
1347static int __init init_i82365(void) 1344static int __init init_i82365(void)
1348{ 1345{
@@ -1352,7 +1349,14 @@ static int __init init_i82365(void)
1352 if (ret) 1349 if (ret)
1353 return ret; 1350 return ret;
1354 1351
1355 ret = platform_device_register(&i82365_device); 1352 i82365_device = platform_device_alloc("i82365", 0);
1353 if (i82365_device) {
1354 ret = platform_device_add(i82365_device);
1355 if (ret)
1356 platform_device_put(i82365_device);
1357 } else
1358 ret = -ENOMEM;
1359
1356 if (ret) { 1360 if (ret) {
1357 driver_unregister(&i82365_driver); 1361 driver_unregister(&i82365_driver);
1358 return ret; 1362 return ret;
@@ -1365,7 +1369,7 @@ static int __init init_i82365(void)
1365 1369
1366 if (sockets == 0) { 1370 if (sockets == 0) {
1367 printk("not found.\n"); 1371 printk("not found.\n");
1368 platform_device_unregister(&i82365_device); 1372 platform_device_unregister(i82365_device);
1369 release_region(i365_base, 2); 1373 release_region(i365_base, 2);
1370 driver_unregister(&i82365_driver); 1374 driver_unregister(&i82365_driver);
1371 return -ENODEV; 1375 return -ENODEV;
@@ -1377,7 +1381,7 @@ static int __init init_i82365(void)
1377 1381
1378 /* register sockets with the pcmcia core */ 1382 /* register sockets with the pcmcia core */
1379 for (i = 0; i < sockets; i++) { 1383 for (i = 0; i < sockets; i++) {
1380 socket[i].socket.dev.dev = &i82365_device.dev; 1384 socket[i].socket.dev.dev = &i82365_device->dev;
1381 socket[i].socket.ops = &pcic_operations; 1385 socket[i].socket.ops = &pcic_operations;
1382 socket[i].socket.resource_ops = &pccard_nonstatic_ops; 1386 socket[i].socket.resource_ops = &pccard_nonstatic_ops;
1383 socket[i].socket.owner = THIS_MODULE; 1387 socket[i].socket.owner = THIS_MODULE;
@@ -1415,7 +1419,7 @@ static void __exit exit_i82365(void)
1415 if (socket[i].flags & IS_REGISTERED) 1419 if (socket[i].flags & IS_REGISTERED)
1416 pcmcia_unregister_socket(&socket[i].socket); 1420 pcmcia_unregister_socket(&socket[i].socket);
1417 } 1421 }
1418 platform_device_unregister(&i82365_device); 1422 platform_device_unregister(i82365_device);
1419 if (poll_interval != 0) 1423 if (poll_interval != 0)
1420 del_timer_sync(&poll_timer); 1424 del_timer_sync(&poll_timer);
1421 if (grab_irq != 0) 1425 if (grab_irq != 0)