aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:02:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:02:07 -0500
commit40d7ee5d162203b40b5f4fbb312ab016edddb97f (patch)
tree432db33df85f7f244676127a189a828dfbf2877b /drivers/memstick
parent5fec8bdbf9a1c4df4ad3f20e52aa2d8caed490c8 (diff)
parentb8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits) uio: make uio_info's name and version const UIO: Documentation for UIO ioport info handling UIO: Pass information about ioports to userspace (V2) UIO: uio_pdrv_genirq: allow custom irq_flags UIO: use pci_ioremap_bar() in drivers/uio arm: struct device - replace bus_id with dev_name(), dev_set_name() libata: struct device - replace bus_id with dev_name(), dev_set_name() avr: struct device - replace bus_id with dev_name(), dev_set_name() block: struct device - replace bus_id with dev_name(), dev_set_name() chris: struct device - replace bus_id with dev_name(), dev_set_name() dmi: struct device - replace bus_id with dev_name(), dev_set_name() gadget: struct device - replace bus_id with dev_name(), dev_set_name() gpio: struct device - replace bus_id with dev_name(), dev_set_name() gpu: struct device - replace bus_id with dev_name(), dev_set_name() hwmon: struct device - replace bus_id with dev_name(), dev_set_name() i2o: struct device - replace bus_id with dev_name(), dev_set_name() IA64: struct device - replace bus_id with dev_name(), dev_set_name() i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name() infiniband: struct device - replace bus_id with dev_name(), dev_set_name() ISDN: struct device - replace bus_id with dev_name(), dev_set_name() ...
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/memstick.c5
-rw-r--r--drivers/memstick/core/mspro_block.c14
-rw-r--r--drivers/memstick/host/tifm_ms.c4
3 files changed, 11 insertions, 12 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index cea46906408e..a5b448ea4eab 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -385,8 +385,7 @@ static struct memstick_dev *memstick_alloc_card(struct memstick_host *host)
385 385
386 if (card) { 386 if (card) {
387 card->host = host; 387 card->host = host;
388 snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), 388 dev_set_name(&card->dev, "%s", dev_name(&host->dev));
389 "%s", host->dev.bus_id);
390 card->dev.parent = &host->dev; 389 card->dev.parent = &host->dev;
391 card->dev.bus = &memstick_bus_type; 390 card->dev.bus = &memstick_bus_type;
392 card->dev.release = memstick_free_card; 391 card->dev.release = memstick_free_card;
@@ -519,7 +518,7 @@ int memstick_add_host(struct memstick_host *host)
519 if (rc) 518 if (rc)
520 return rc; 519 return rc;
521 520
522 snprintf(host->dev.bus_id, BUS_ID_SIZE, "memstick%u", host->id); 521 dev_set_name(&host->dev, "memstick%u", host->id);
523 522
524 rc = device_add(&host->dev); 523 rc = device_add(&host->dev);
525 if (rc) { 524 if (rc) {
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index 7911151e56a3..1f1e3982b1aa 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -887,14 +887,14 @@ try_again:
887 if (rc) { 887 if (rc) {
888 printk(KERN_WARNING 888 printk(KERN_WARNING
889 "%s: could not switch to 4-bit mode, error %d\n", 889 "%s: could not switch to 4-bit mode, error %d\n",
890 card->dev.bus_id, rc); 890 dev_name(&card->dev), rc);
891 return 0; 891 return 0;
892 } 892 }
893 893
894 msb->system = MEMSTICK_SYS_PAR4; 894 msb->system = MEMSTICK_SYS_PAR4;
895 host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PAR4); 895 host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PAR4);
896 printk(KERN_INFO "%s: switching to 4-bit parallel mode\n", 896 printk(KERN_INFO "%s: switching to 4-bit parallel mode\n",
897 card->dev.bus_id); 897 dev_name(&card->dev));
898 898
899 if (msb->caps & MEMSTICK_CAP_PAR8) { 899 if (msb->caps & MEMSTICK_CAP_PAR8) {
900 rc = mspro_block_set_interface(card, MEMSTICK_SYS_PAR8); 900 rc = mspro_block_set_interface(card, MEMSTICK_SYS_PAR8);
@@ -905,11 +905,11 @@ try_again:
905 MEMSTICK_PAR8); 905 MEMSTICK_PAR8);
906 printk(KERN_INFO 906 printk(KERN_INFO
907 "%s: switching to 8-bit parallel mode\n", 907 "%s: switching to 8-bit parallel mode\n",
908 card->dev.bus_id); 908 dev_name(&card->dev));
909 } else 909 } else
910 printk(KERN_WARNING 910 printk(KERN_WARNING
911 "%s: could not switch to 8-bit mode, error %d\n", 911 "%s: could not switch to 8-bit mode, error %d\n",
912 card->dev.bus_id, rc); 912 dev_name(&card->dev), rc);
913 } 913 }
914 914
915 card->next_request = h_mspro_block_req_init; 915 card->next_request = h_mspro_block_req_init;
@@ -922,7 +922,7 @@ try_again:
922 if (rc) { 922 if (rc) {
923 printk(KERN_WARNING 923 printk(KERN_WARNING
924 "%s: interface error, trying to fall back to serial\n", 924 "%s: interface error, trying to fall back to serial\n",
925 card->dev.bus_id); 925 dev_name(&card->dev));
926 msb->system = MEMSTICK_SYS_SERIAL; 926 msb->system = MEMSTICK_SYS_SERIAL;
927 host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF); 927 host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
928 msleep(10); 928 msleep(10);
@@ -992,14 +992,14 @@ static int mspro_block_read_attributes(struct memstick_dev *card)
992 992
993 if (be16_to_cpu(attr->signature) != MSPRO_BLOCK_SIGNATURE) { 993 if (be16_to_cpu(attr->signature) != MSPRO_BLOCK_SIGNATURE) {
994 printk(KERN_ERR "%s: unrecognized device signature %x\n", 994 printk(KERN_ERR "%s: unrecognized device signature %x\n",
995 card->dev.bus_id, be16_to_cpu(attr->signature)); 995 dev_name(&card->dev), be16_to_cpu(attr->signature));
996 rc = -ENODEV; 996 rc = -ENODEV;
997 goto out_free_attr; 997 goto out_free_attr;
998 } 998 }
999 999
1000 if (attr->count > MSPRO_BLOCK_MAX_ATTRIBUTES) { 1000 if (attr->count > MSPRO_BLOCK_MAX_ATTRIBUTES) {
1001 printk(KERN_WARNING "%s: way too many attribute entries\n", 1001 printk(KERN_WARNING "%s: way too many attribute entries\n",
1002 card->dev.bus_id); 1002 dev_name(&card->dev));
1003 attr_count = MSPRO_BLOCK_MAX_ATTRIBUTES; 1003 attr_count = MSPRO_BLOCK_MAX_ATTRIBUTES;
1004 } else 1004 } else
1005 attr_count = attr->count; 1005 attr_count = attr->count;
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
index d32d6ad8f3fc..03f71a431c82 100644
--- a/drivers/memstick/host/tifm_ms.c
+++ b/drivers/memstick/host/tifm_ms.c
@@ -546,7 +546,7 @@ static void tifm_ms_abort(unsigned long data)
546 printk(KERN_ERR 546 printk(KERN_ERR
547 "%s : card failed to respond for a long period of time " 547 "%s : card failed to respond for a long period of time "
548 "(%x, %x)\n", 548 "(%x, %x)\n",
549 host->dev->dev.bus_id, host->req ? host->req->tpc : 0, 549 dev_name(&host->dev->dev), host->req ? host->req->tpc : 0,
550 host->cmd_flags); 550 host->cmd_flags);
551 551
552 tifm_eject(host->dev); 552 tifm_eject(host->dev);
@@ -561,7 +561,7 @@ static int tifm_ms_probe(struct tifm_dev *sock)
561 if (!(TIFM_SOCK_STATE_OCCUPIED 561 if (!(TIFM_SOCK_STATE_OCCUPIED
562 & readl(sock->addr + SOCK_PRESENT_STATE))) { 562 & readl(sock->addr + SOCK_PRESENT_STATE))) {
563 printk(KERN_WARNING "%s : card gone, unexpectedly\n", 563 printk(KERN_WARNING "%s : card gone, unexpectedly\n",
564 sock->dev.bus_id); 564 dev_name(&sock->dev));
565 return rc; 565 return rc;
566 } 566 }
567 567