aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-10-10 15:33:10 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-10 15:33:50 -0400
commit1bf5b2853925cf92bfc5f0eddb68a8ed18782845 (patch)
treeacc51c9017ea2c8f155be805f49cfe68a23c6a9b /drivers/s390
parent2a0217d5c7d22d6dd28f8ae5d20b06d24dc426b8 (diff)
[S390] bus_id -> dev_set_name() changes
Convert most s390 users setting bus_id to dev_set_name(). css and ccw busses are deferred since they need some special treatment. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dcssblk.c2
-rw-r--r--drivers/s390/char/vmlogrdr.c3
-rw-r--r--drivers/s390/cio/ccwgroup.c3
-rw-r--r--drivers/s390/cio/chp.c3
-rw-r--r--drivers/s390/cio/css.c4
-rw-r--r--drivers/s390/crypto/ap_bus.c4
-rw-r--r--drivers/s390/net/netiucv.c2
-rw-r--r--drivers/s390/s390_rdev.c2
-rw-r--r--drivers/s390/scsi/zfcp_aux.c7
9 files changed, 13 insertions, 17 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 2aca79e952b0..ea4272c8c677 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -343,7 +343,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
343 } 343 }
344 344
345 strcpy(dev_info->segment_name, local_buf); 345 strcpy(dev_info->segment_name, local_buf);
346 strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE); 346 dev_set_name(&dev_info->dev, local_buf);
347 dev_info->dev.release = dcssblk_release_segment; 347 dev_info->dev.release = dcssblk_release_segment;
348 INIT_LIST_HEAD(&dev_info->lh); 348 INIT_LIST_HEAD(&dev_info->lh);
349 349
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index 036e650e8b9c..42173cc34610 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -724,8 +724,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
724 724
725 dev = kzalloc(sizeof(struct device), GFP_KERNEL); 725 dev = kzalloc(sizeof(struct device), GFP_KERNEL);
726 if (dev) { 726 if (dev) {
727 snprintf(dev->bus_id, BUS_ID_SIZE, "%s", 727 dev_set_name(dev, priv->internal_name);
728 priv->internal_name);
729 dev->bus = &iucv_bus; 728 dev->bus = &iucv_bus;
730 dev->parent = iucv_root; 729 dev->parent = iucv_root;
731 dev->driver = &vmlogrdr_driver; 730 dev->driver = &vmlogrdr_driver;
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index e17b462ace03..3ac2c2019f5e 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -269,8 +269,7 @@ int ccwgroup_create_from_string(struct device *root, unsigned int creator_id,
269 goto error; 269 goto error;
270 } 270 }
271 271
272 snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", 272 dev_set_name(&gdev->dev, "%s", dev_name(&gdev->cdev[0]->dev));
273 dev_name(&gdev->cdev[0]->dev));
274 273
275 rc = device_add(&gdev->dev); 274 rc = device_add(&gdev->dev);
276 if (rc) 275 if (rc)
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index f1216cf6fa8f..1246f61a5338 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -393,8 +393,7 @@ int chp_new(struct chp_id chpid)
393 chp->state = 1; 393 chp->state = 1;
394 chp->dev.parent = &channel_subsystems[chpid.cssid]->device; 394 chp->dev.parent = &channel_subsystems[chpid.cssid]->device;
395 chp->dev.release = chp_release; 395 chp->dev.release = chp_release;
396 snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp%x.%02x", chpid.cssid, 396 dev_set_name(&chp->dev, "chp%x.%02x", chpid.cssid, chpid.id);
397 chpid.id);
398 397
399 /* Obtain channel path description and fill it in. */ 398 /* Obtain channel path description and fill it in. */
400 ret = chsc_determine_base_channel_path_desc(chpid, &chp->desc); 399 ret = chsc_determine_base_channel_path_desc(chpid, &chp->desc);
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 1261e1a9e8cd..76bbb1e74c29 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -698,7 +698,7 @@ static int __init setup_css(int nr)
698 return -ENOMEM; 698 return -ENOMEM;
699 css->pseudo_subchannel->dev.parent = &css->device; 699 css->pseudo_subchannel->dev.parent = &css->device;
700 css->pseudo_subchannel->dev.release = css_subchannel_release; 700 css->pseudo_subchannel->dev.release = css_subchannel_release;
701 sprintf(css->pseudo_subchannel->dev.bus_id, "defunct"); 701 dev_set_name(&css->pseudo_subchannel->dev, "defunct");
702 ret = cio_create_sch_lock(css->pseudo_subchannel); 702 ret = cio_create_sch_lock(css->pseudo_subchannel);
703 if (ret) { 703 if (ret) {
704 kfree(css->pseudo_subchannel); 704 kfree(css->pseudo_subchannel);
@@ -707,7 +707,7 @@ static int __init setup_css(int nr)
707 mutex_init(&css->mutex); 707 mutex_init(&css->mutex);
708 css->valid = 1; 708 css->valid = 1;
709 css->cssid = nr; 709 css->cssid = nr;
710 sprintf(css->device.bus_id, "css%x", nr); 710 dev_set_name(&css->device, "css%x", nr);
711 css->device.release = channel_subsystem_release; 711 css->device.release = channel_subsystem_release;
712 tod_high = (u32) (get_clock() >> 32); 712 tod_high = (u32) (get_clock() >> 32);
713 css_generate_pgid(css, tod_high); 713 css_generate_pgid(css, tod_high);
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 62b6b55230d0..326db1e827c4 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -892,8 +892,8 @@ static void ap_scan_bus(struct work_struct *unused)
892 892
893 ap_dev->device.bus = &ap_bus_type; 893 ap_dev->device.bus = &ap_bus_type;
894 ap_dev->device.parent = ap_root_device; 894 ap_dev->device.parent = ap_root_device;
895 snprintf(ap_dev->device.bus_id, BUS_ID_SIZE, "card%02x", 895 dev_set_name(&ap_dev->device, "card%02x",
896 AP_QID_DEVICE(ap_dev->qid)); 896 AP_QID_DEVICE(ap_dev->qid));
897 ap_dev->device.release = ap_device_release; 897 ap_dev->device.release = ap_device_release;
898 rc = device_register(&ap_dev->device); 898 rc = device_register(&ap_dev->device);
899 if (rc) { 899 if (rc) {
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 9242b5acc66b..0fea51e34b57 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -1724,7 +1724,7 @@ static int netiucv_register_device(struct net_device *ndev)
1724 IUCV_DBF_TEXT(trace, 3, __func__); 1724 IUCV_DBF_TEXT(trace, 3, __func__);
1725 1725
1726 if (dev) { 1726 if (dev) {
1727 snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); 1727 dev_set_name(dev, "net%s", ndev->name);
1728 dev->bus = &iucv_bus; 1728 dev->bus = &iucv_bus;
1729 dev->parent = iucv_root; 1729 dev->parent = iucv_root;
1730 /* 1730 /*
diff --git a/drivers/s390/s390_rdev.c b/drivers/s390/s390_rdev.c
index 3c7145d9f9a1..64371c05a3b3 100644
--- a/drivers/s390/s390_rdev.c
+++ b/drivers/s390/s390_rdev.c
@@ -30,7 +30,7 @@ s390_root_dev_register(const char *name)
30 dev = kzalloc(sizeof(struct device), GFP_KERNEL); 30 dev = kzalloc(sizeof(struct device), GFP_KERNEL);
31 if (!dev) 31 if (!dev)
32 return ERR_PTR(-ENOMEM); 32 return ERR_PTR(-ENOMEM);
33 strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE)); 33 dev_set_name(dev, name);
34 dev->release = s390_root_dev_release; 34 dev->release = s390_root_dev_release;
35 ret = device_register(dev); 35 ret = device_register(dev);
36 if (ret) { 36 if (ret) {
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 24255e42dc30..3b56220fb900 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -283,8 +283,8 @@ struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun)
283 unit->port = port; 283 unit->port = port;
284 unit->fcp_lun = fcp_lun; 284 unit->fcp_lun = fcp_lun;
285 285
286 snprintf(unit->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", 286 dev_set_name(&unit->sysfs_device, "0x%016llx",
287 (unsigned long long) fcp_lun); 287 (unsigned long long) fcp_lun);
288 unit->sysfs_device.parent = &port->sysfs_device; 288 unit->sysfs_device.parent = &port->sysfs_device;
289 unit->sysfs_device.release = zfcp_sysfs_unit_release; 289 unit->sysfs_device.release = zfcp_sysfs_unit_release;
290 dev_set_drvdata(&unit->sysfs_device, unit); 290 dev_set_drvdata(&unit->sysfs_device, unit);
@@ -610,8 +610,7 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
610 atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); 610 atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status);
611 atomic_set(&port->refcount, 0); 611 atomic_set(&port->refcount, 0);
612 612
613 snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", 613 dev_set_name(&port->sysfs_device, "0x%016llx", wwpn);
614 (unsigned long long) wwpn);
615 port->sysfs_device.parent = &adapter->ccw_device->dev; 614 port->sysfs_device.parent = &adapter->ccw_device->dev;
616 615
617 port->sysfs_device.release = zfcp_sysfs_port_release; 616 port->sysfs_device.release = zfcp_sysfs_port_release;