diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-25 13:38:55 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 13:39:03 +0100 |
commit | 98df67b324a2a986987ce29986e44ae9156b6698 (patch) | |
tree | 13cd3c37116c115761c54184cdd8e41e164a6c84 /drivers/s390/cio | |
parent | 0cd4bd4754d51bdc8f9cd880c29910d0d52337bb (diff) | |
download | linux-98df67b324a2a986987ce29986e44ae9156b6698.tar.gz linux-98df67b324a2a986987ce29986e44ae9156b6698.tar.bz2 linux-98df67b324a2a986987ce29986e44ae9156b6698.zip |
[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/cio')
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 8 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 3ac2c2019f5e..17fa009d9959 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -19,6 +19,8 @@ #include <asm/ccwdev.h> #include <asm/ccwgroup.h> +#define CCW_BUS_ID_SIZE 20 + /* In Linux 2.4, we had a channel device layer called "chandev" * that did all sorts of obscure stuff for networking devices. * This is another driver that serves as a replacement for just @@ -172,7 +174,7 @@ static int __get_next_bus_id(const char **buf, char *bus_id) len = end - start + 1; end++; } - if (len < BUS_ID_SIZE) { + if (len < CCW_BUS_ID_SIZE) { strlcpy(bus_id, start, len); rc = 0; } else @@ -181,7 +183,7 @@ static int __get_next_bus_id(const char **buf, char *bus_id) return rc; } -static int __is_valid_bus_id(char bus_id[BUS_ID_SIZE]) +static int __is_valid_bus_id(char bus_id[CCW_BUS_ID_SIZE]) { int cssid, ssid, devno; @@ -213,7 +215,7 @@ int ccwgroup_create_from_string(struct device *root, unsigned int creator_id, { struct ccwgroup_device *gdev; int rc, i; - char tmp_bus_id[BUS_ID_SIZE]; + char tmp_bus_id[CCW_BUS_ID_SIZE]; const char *curr_buf; gdev = kzalloc(sizeof(*gdev) + num_devices * sizeof(gdev->cdev[0]), diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 4e4008325e28..fac85160a753 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -1723,7 +1723,7 @@ __ccwdev_check_busid(struct device *dev, void *id) bus_id = id; - return (strncmp(bus_id, dev_name(dev), BUS_ID_SIZE) == 0); + return (strcmp(bus_id, dev_name(dev)) == 0); } |