diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-25 07:38:55 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:03 -0500 |
commit | 98df67b324a2a986987ce29986e44ae9156b6698 (patch) | |
tree | 13cd3c37116c115761c54184cdd8e41e164a6c84 /drivers/s390/block | |
parent | 0cd4bd4754d51bdc8f9cd880c29910d0d52337bb (diff) |
[S390] struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 13 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 5 |
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 3f4881e01cb6..2ef25731d197 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | /* This is ugly... */ | 24 | /* This is ugly... */ |
25 | #define PRINTK_HEADER "dasd_devmap:" | 25 | #define PRINTK_HEADER "dasd_devmap:" |
26 | #define DASD_BUS_ID_SIZE 20 | ||
26 | 27 | ||
27 | #include "dasd_int.h" | 28 | #include "dasd_int.h" |
28 | 29 | ||
@@ -41,7 +42,7 @@ EXPORT_SYMBOL_GPL(dasd_page_cache); | |||
41 | */ | 42 | */ |
42 | struct dasd_devmap { | 43 | struct dasd_devmap { |
43 | struct list_head list; | 44 | struct list_head list; |
44 | char bus_id[BUS_ID_SIZE]; | 45 | char bus_id[DASD_BUS_ID_SIZE]; |
45 | unsigned int devindex; | 46 | unsigned int devindex; |
46 | unsigned short features; | 47 | unsigned short features; |
47 | struct dasd_device *device; | 48 | struct dasd_device *device; |
@@ -94,7 +95,7 @@ dasd_hash_busid(const char *bus_id) | |||
94 | int hash, i; | 95 | int hash, i; |
95 | 96 | ||
96 | hash = 0; | 97 | hash = 0; |
97 | for (i = 0; (i < BUS_ID_SIZE) && *bus_id; i++, bus_id++) | 98 | for (i = 0; (i < DASD_BUS_ID_SIZE) && *bus_id; i++, bus_id++) |
98 | hash += *bus_id; | 99 | hash += *bus_id; |
99 | return hash & 0xff; | 100 | return hash & 0xff; |
100 | } | 101 | } |
@@ -301,7 +302,7 @@ dasd_parse_range( char *parsestring ) { | |||
301 | int from, from_id0, from_id1; | 302 | int from, from_id0, from_id1; |
302 | int to, to_id0, to_id1; | 303 | int to, to_id0, to_id1; |
303 | int features, rc; | 304 | int features, rc; |
304 | char bus_id[BUS_ID_SIZE+1], *str; | 305 | char bus_id[DASD_BUS_ID_SIZE+1], *str; |
305 | 306 | ||
306 | str = parsestring; | 307 | str = parsestring; |
307 | rc = dasd_busid(&str, &from_id0, &from_id1, &from); | 308 | rc = dasd_busid(&str, &from_id0, &from_id1, &from); |
@@ -407,14 +408,14 @@ dasd_add_busid(const char *bus_id, int features) | |||
407 | devmap = NULL; | 408 | devmap = NULL; |
408 | hash = dasd_hash_busid(bus_id); | 409 | hash = dasd_hash_busid(bus_id); |
409 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) | 410 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) |
410 | if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { | 411 | if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) { |
411 | devmap = tmp; | 412 | devmap = tmp; |
412 | break; | 413 | break; |
413 | } | 414 | } |
414 | if (!devmap) { | 415 | if (!devmap) { |
415 | /* This bus_id is new. */ | 416 | /* This bus_id is new. */ |
416 | new->devindex = dasd_max_devindex++; | 417 | new->devindex = dasd_max_devindex++; |
417 | strncpy(new->bus_id, bus_id, BUS_ID_SIZE); | 418 | strncpy(new->bus_id, bus_id, DASD_BUS_ID_SIZE); |
418 | new->features = features; | 419 | new->features = features; |
419 | new->device = NULL; | 420 | new->device = NULL; |
420 | list_add(&new->list, &dasd_hashlists[hash]); | 421 | list_add(&new->list, &dasd_hashlists[hash]); |
@@ -439,7 +440,7 @@ dasd_find_busid(const char *bus_id) | |||
439 | devmap = ERR_PTR(-ENODEV); | 440 | devmap = ERR_PTR(-ENODEV); |
440 | hash = dasd_hash_busid(bus_id); | 441 | hash = dasd_hash_busid(bus_id); |
441 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) { | 442 | list_for_each_entry(tmp, &dasd_hashlists[hash], list) { |
442 | if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { | 443 | if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) { |
443 | devmap = tmp; | 444 | devmap = tmp; |
444 | break; | 445 | break; |
445 | } | 446 | } |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 63f26a135fe5..b1b204c448ed 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #define DCSSBLK_NAME "dcssblk" | 21 | #define DCSSBLK_NAME "dcssblk" |
22 | #define DCSSBLK_MINORS_PER_DISK 1 | 22 | #define DCSSBLK_MINORS_PER_DISK 1 |
23 | #define DCSSBLK_PARM_LEN 400 | 23 | #define DCSSBLK_PARM_LEN 400 |
24 | #define DCSS_BUS_ID_SIZE 20 | ||
24 | 25 | ||
25 | #ifdef DCSSBLK_DEBUG | 26 | #ifdef DCSSBLK_DEBUG |
26 | #define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x) | 27 | #define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x) |
@@ -50,7 +51,7 @@ static struct block_device_operations dcssblk_devops = { | |||
50 | struct dcssblk_dev_info { | 51 | struct dcssblk_dev_info { |
51 | struct list_head lh; | 52 | struct list_head lh; |
52 | struct device dev; | 53 | struct device dev; |
53 | char segment_name[BUS_ID_SIZE]; | 54 | char segment_name[DCSS_BUS_ID_SIZE]; |
54 | atomic_t use_count; | 55 | atomic_t use_count; |
55 | struct gendisk *gd; | 56 | struct gendisk *gd; |
56 | unsigned long start; | 57 | unsigned long start; |
@@ -65,7 +66,7 @@ struct dcssblk_dev_info { | |||
65 | 66 | ||
66 | struct segment_info { | 67 | struct segment_info { |
67 | struct list_head lh; | 68 | struct list_head lh; |
68 | char segment_name[BUS_ID_SIZE]; | 69 | char segment_name[DCSS_BUS_ID_SIZE]; |
69 | unsigned long start; | 70 | unsigned long start; |
70 | unsigned long end; | 71 | unsigned long end; |
71 | int segment_type; | 72 | int segment_type; |