diff options
Diffstat (limited to 'drivers/s390/block/dasd_devmap.c')
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 216bc4fba199..672e50314b12 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -123,7 +123,7 @@ static inline int | |||
123 | dasd_busid(char **str, int *id0, int *id1, int *devno) | 123 | dasd_busid(char **str, int *id0, int *id1, int *devno) |
124 | { | 124 | { |
125 | int val, old_style; | 125 | int val, old_style; |
126 | 126 | ||
127 | /* check for leading '0x' */ | 127 | /* check for leading '0x' */ |
128 | old_style = 0; | 128 | old_style = 0; |
129 | if ((*str)[0] == '0' && (*str)[1] == 'x') { | 129 | if ((*str)[0] == '0' && (*str)[1] == 'x') { |
@@ -179,7 +179,7 @@ dasd_feature_list(char *str, char **endp) | |||
179 | features = 0; | 179 | features = 0; |
180 | 180 | ||
181 | while (1) { | 181 | while (1) { |
182 | for (len = 0; | 182 | for (len = 0; |
183 | str[len] && str[len] != ':' && str[len] != ')'; len++); | 183 | str[len] && str[len] != ':' && str[len] != ')'; len++); |
184 | if (len == 2 && !strncmp(str, "ro", 2)) | 184 | if (len == 2 && !strncmp(str, "ro", 2)) |
185 | features |= DASD_FEATURE_READONLY; | 185 | features |= DASD_FEATURE_READONLY; |
@@ -359,7 +359,7 @@ dasd_parse(void) | |||
359 | * Add a devmap for the device specified by busid. It is possible that | 359 | * Add a devmap for the device specified by busid. It is possible that |
360 | * the devmap already exists (dasd= parameter). The order of the devices | 360 | * the devmap already exists (dasd= parameter). The order of the devices |
361 | * added through this function will define the kdevs for the individual | 361 | * added through this function will define the kdevs for the individual |
362 | * devices. | 362 | * devices. |
363 | */ | 363 | */ |
364 | static struct dasd_devmap * | 364 | static struct dasd_devmap * |
365 | dasd_add_busid(char *bus_id, int features) | 365 | dasd_add_busid(char *bus_id, int features) |
@@ -368,7 +368,7 @@ dasd_add_busid(char *bus_id, int features) | |||
368 | int hash; | 368 | int hash; |
369 | 369 | ||
370 | new = (struct dasd_devmap *) | 370 | new = (struct dasd_devmap *) |
371 | kmalloc(sizeof(struct dasd_devmap), GFP_KERNEL); | 371 | kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL); |
372 | if (!new) | 372 | if (!new) |
373 | return ERR_PTR(-ENOMEM); | 373 | return ERR_PTR(-ENOMEM); |
374 | spin_lock(&dasd_devmap_lock); | 374 | spin_lock(&dasd_devmap_lock); |
@@ -630,7 +630,8 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
630 | } | 630 | } |
631 | 631 | ||
632 | static ssize_t | 632 | static ssize_t |
633 | dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 633 | dasd_ro_store(struct device *dev, struct device_attribute *attr, |
634 | const char *buf, size_t count) | ||
634 | { | 635 | { |
635 | struct dasd_devmap *devmap; | 636 | struct dasd_devmap *devmap; |
636 | int ro_flag; | 637 | int ro_flag; |
@@ -658,7 +659,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store); | |||
658 | * use_diag controls whether the driver should use diag rather than ssch | 659 | * use_diag controls whether the driver should use diag rather than ssch |
659 | * to talk to the device | 660 | * to talk to the device |
660 | */ | 661 | */ |
661 | static ssize_t | 662 | static ssize_t |
662 | dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) | 663 | dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) |
663 | { | 664 | { |
664 | struct dasd_devmap *devmap; | 665 | struct dasd_devmap *devmap; |
@@ -673,7 +674,8 @@ dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
673 | } | 674 | } |
674 | 675 | ||
675 | static ssize_t | 676 | static ssize_t |
676 | dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 677 | dasd_use_diag_store(struct device *dev, struct device_attribute *attr, |
678 | const char *buf, size_t count) | ||
677 | { | 679 | { |
678 | struct dasd_devmap *devmap; | 680 | struct dasd_devmap *devmap; |
679 | ssize_t rc; | 681 | ssize_t rc; |
@@ -697,11 +699,11 @@ dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const cha | |||
697 | return rc; | 699 | return rc; |
698 | } | 700 | } |
699 | 701 | ||
700 | static | 702 | static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); |
701 | DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); | ||
702 | 703 | ||
703 | static ssize_t | 704 | static ssize_t |
704 | dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) | 705 | dasd_discipline_show(struct device *dev, struct device_attribute *attr, |
706 | char *buf) | ||
705 | { | 707 | { |
706 | struct dasd_devmap *devmap; | 708 | struct dasd_devmap *devmap; |
707 | char *dname; | 709 | char *dname; |