aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-01-06 13:44:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:44:38 -0500
commit0252c3b4f0188ceb9ce48a340e6bfd17ab28afa7 (patch)
tree3e60fff61d761562b3db6f3c7cf29f30b2b2065d /drivers/memstick
parent1bb5beb49f8f32c5293cae0695db2492804772a3 (diff)
memstick: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Alex Dubov <oakad@yahoo.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 cea46906408..a5b448ea4ea 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 7911151e56a..1f1e3982b1a 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 d32d6ad8f3f..03f71a431c8 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