diff options
-rw-r--r-- | drivers/s390/char/con3215.c | 16 | ||||
-rw-r--r-- | drivers/s390/char/raw3270.c | 16 | ||||
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 22 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/vmur.c | 16 | ||||
-rw-r--r-- | drivers/s390/net/claw.c | 52 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 20 | ||||
-rw-r--r-- | drivers/s390/net/lcs.h | 4 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 47 |
11 files changed, 105 insertions, 104 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 9ab06e0dad40..c639361d8085 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -368,7 +368,7 @@ raw3215_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
368 | int cstat, dstat; | 368 | int cstat, dstat; |
369 | int count; | 369 | int count; |
370 | 370 | ||
371 | raw = cdev->dev.driver_data; | 371 | raw = dev_get_drvdata(&cdev->dev); |
372 | req = (struct raw3215_req *) intparm; | 372 | req = (struct raw3215_req *) intparm; |
373 | cstat = irb->scsw.cmd.cstat; | 373 | cstat = irb->scsw.cmd.cstat; |
374 | dstat = irb->scsw.cmd.dstat; | 374 | dstat = irb->scsw.cmd.dstat; |
@@ -635,7 +635,7 @@ raw3215_probe (struct ccw_device *cdev) | |||
635 | int line; | 635 | int line; |
636 | 636 | ||
637 | /* Console is special. */ | 637 | /* Console is special. */ |
638 | if (raw3215[0] && (cdev->dev.driver_data == raw3215[0])) | 638 | if (raw3215[0] && (raw3215[0] == dev_get_drvdata(&cdev->dev))) |
639 | return 0; | 639 | return 0; |
640 | raw = kmalloc(sizeof(struct raw3215_info) + | 640 | raw = kmalloc(sizeof(struct raw3215_info) + |
641 | RAW3215_INBUF_SIZE, GFP_KERNEL|GFP_DMA); | 641 | RAW3215_INBUF_SIZE, GFP_KERNEL|GFP_DMA); |
@@ -669,7 +669,7 @@ raw3215_probe (struct ccw_device *cdev) | |||
669 | } | 669 | } |
670 | init_waitqueue_head(&raw->empty_wait); | 670 | init_waitqueue_head(&raw->empty_wait); |
671 | 671 | ||
672 | cdev->dev.driver_data = raw; | 672 | dev_set_drvdata(&cdev->dev, raw); |
673 | cdev->handler = raw3215_irq; | 673 | cdev->handler = raw3215_irq; |
674 | 674 | ||
675 | return 0; | 675 | return 0; |
@@ -681,9 +681,9 @@ raw3215_remove (struct ccw_device *cdev) | |||
681 | struct raw3215_info *raw; | 681 | struct raw3215_info *raw; |
682 | 682 | ||
683 | ccw_device_set_offline(cdev); | 683 | ccw_device_set_offline(cdev); |
684 | raw = cdev->dev.driver_data; | 684 | raw = dev_get_drvdata(&cdev->dev); |
685 | if (raw) { | 685 | if (raw) { |
686 | cdev->dev.driver_data = NULL; | 686 | dev_set_drvdata(&cdev->dev, NULL); |
687 | kfree(raw->buffer); | 687 | kfree(raw->buffer); |
688 | kfree(raw); | 688 | kfree(raw); |
689 | } | 689 | } |
@@ -694,7 +694,7 @@ raw3215_set_online (struct ccw_device *cdev) | |||
694 | { | 694 | { |
695 | struct raw3215_info *raw; | 695 | struct raw3215_info *raw; |
696 | 696 | ||
697 | raw = cdev->dev.driver_data; | 697 | raw = dev_get_drvdata(&cdev->dev); |
698 | if (!raw) | 698 | if (!raw) |
699 | return -ENODEV; | 699 | return -ENODEV; |
700 | 700 | ||
@@ -706,7 +706,7 @@ raw3215_set_offline (struct ccw_device *cdev) | |||
706 | { | 706 | { |
707 | struct raw3215_info *raw; | 707 | struct raw3215_info *raw; |
708 | 708 | ||
709 | raw = cdev->dev.driver_data; | 709 | raw = dev_get_drvdata(&cdev->dev); |
710 | if (!raw) | 710 | if (!raw) |
711 | return -ENODEV; | 711 | return -ENODEV; |
712 | 712 | ||
@@ -848,7 +848,7 @@ con3215_init(void) | |||
848 | raw->buffer = (char *) alloc_bootmem_low(RAW3215_BUFFER_SIZE); | 848 | raw->buffer = (char *) alloc_bootmem_low(RAW3215_BUFFER_SIZE); |
849 | raw->inbuf = (char *) alloc_bootmem_low(RAW3215_INBUF_SIZE); | 849 | raw->inbuf = (char *) alloc_bootmem_low(RAW3215_INBUF_SIZE); |
850 | raw->cdev = cdev; | 850 | raw->cdev = cdev; |
851 | cdev->dev.driver_data = raw; | 851 | dev_set_drvdata(&cdev->dev, raw); |
852 | cdev->handler = raw3215_irq; | 852 | cdev->handler = raw3215_irq; |
853 | 853 | ||
854 | raw->flags |= RAW3215_FIXED; | 854 | raw->flags |= RAW3215_FIXED; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 0b15cf107ec9..1ab69df2684c 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -355,7 +355,7 @@ raw3270_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
355 | struct raw3270_request *rq; | 355 | struct raw3270_request *rq; |
356 | int rc; | 356 | int rc; |
357 | 357 | ||
358 | rp = (struct raw3270 *) cdev->dev.driver_data; | 358 | rp = dev_get_drvdata(&cdev->dev); |
359 | if (!rp) | 359 | if (!rp) |
360 | return; | 360 | return; |
361 | rq = (struct raw3270_request *) intparm; | 361 | rq = (struct raw3270_request *) intparm; |
@@ -828,7 +828,7 @@ raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp, char *ascebc) | |||
828 | if (rp->minor == -1) | 828 | if (rp->minor == -1) |
829 | return -EUSERS; | 829 | return -EUSERS; |
830 | rp->cdev = cdev; | 830 | rp->cdev = cdev; |
831 | cdev->dev.driver_data = rp; | 831 | dev_set_drvdata(&cdev->dev, rp); |
832 | cdev->handler = raw3270_irq; | 832 | cdev->handler = raw3270_irq; |
833 | return 0; | 833 | return 0; |
834 | } | 834 | } |
@@ -1105,7 +1105,7 @@ raw3270_delete_device(struct raw3270 *rp) | |||
1105 | /* Disconnect from ccw_device. */ | 1105 | /* Disconnect from ccw_device. */ |
1106 | cdev = rp->cdev; | 1106 | cdev = rp->cdev; |
1107 | rp->cdev = NULL; | 1107 | rp->cdev = NULL; |
1108 | cdev->dev.driver_data = NULL; | 1108 | dev_set_drvdata(&cdev->dev, NULL); |
1109 | cdev->handler = NULL; | 1109 | cdev->handler = NULL; |
1110 | 1110 | ||
1111 | /* Put ccw_device structure. */ | 1111 | /* Put ccw_device structure. */ |
@@ -1129,7 +1129,7 @@ static ssize_t | |||
1129 | raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) | 1129 | raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) |
1130 | { | 1130 | { |
1131 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1131 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1132 | ((struct raw3270 *) dev->driver_data)->model); | 1132 | ((struct raw3270 *) dev_get_drvdata(dev))->model); |
1133 | } | 1133 | } |
1134 | static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); | 1134 | static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); |
1135 | 1135 | ||
@@ -1137,7 +1137,7 @@ static ssize_t | |||
1137 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) | 1137 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) |
1138 | { | 1138 | { |
1139 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1139 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1140 | ((struct raw3270 *) dev->driver_data)->rows); | 1140 | ((struct raw3270 *) dev_get_drvdata(dev))->rows); |
1141 | } | 1141 | } |
1142 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); | 1142 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); |
1143 | 1143 | ||
@@ -1145,7 +1145,7 @@ static ssize_t | |||
1145 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) | 1145 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) |
1146 | { | 1146 | { |
1147 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1147 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1148 | ((struct raw3270 *) dev->driver_data)->cols); | 1148 | ((struct raw3270 *) dev_get_drvdata(dev))->cols); |
1149 | } | 1149 | } |
1150 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); | 1150 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); |
1151 | 1151 | ||
@@ -1282,7 +1282,7 @@ raw3270_remove (struct ccw_device *cdev) | |||
1282 | struct raw3270_view *v; | 1282 | struct raw3270_view *v; |
1283 | struct raw3270_notifier *np; | 1283 | struct raw3270_notifier *np; |
1284 | 1284 | ||
1285 | rp = cdev->dev.driver_data; | 1285 | rp = dev_get_drvdata(&cdev->dev); |
1286 | /* | 1286 | /* |
1287 | * _remove is the opposite of _probe; it's probe that | 1287 | * _remove is the opposite of _probe; it's probe that |
1288 | * should set up rp. raw3270_remove gets entered for | 1288 | * should set up rp. raw3270_remove gets entered for |
@@ -1330,7 +1330,7 @@ raw3270_set_offline (struct ccw_device *cdev) | |||
1330 | { | 1330 | { |
1331 | struct raw3270 *rp; | 1331 | struct raw3270 *rp; |
1332 | 1332 | ||
1333 | rp = cdev->dev.driver_data; | 1333 | rp = dev_get_drvdata(&cdev->dev); |
1334 | if (test_bit(RAW3270_FLAGS_CONSOLE, &rp->flags)) | 1334 | if (test_bit(RAW3270_FLAGS_CONSOLE, &rp->flags)) |
1335 | return -EBUSY; | 1335 | return -EBUSY; |
1336 | raw3270_remove(cdev); | 1336 | raw3270_remove(cdev); |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 2d00a383a475..997ed5807589 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -1289,7 +1289,7 @@ static int | |||
1289 | tape_34xx_online(struct ccw_device *cdev) | 1289 | tape_34xx_online(struct ccw_device *cdev) |
1290 | { | 1290 | { |
1291 | return tape_generic_online( | 1291 | return tape_generic_online( |
1292 | cdev->dev.driver_data, | 1292 | dev_get_drvdata(&cdev->dev), |
1293 | &tape_discipline_34xx | 1293 | &tape_discipline_34xx |
1294 | ); | 1294 | ); |
1295 | } | 1295 | } |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index c453b2f3e9f4..5de27c9e4af1 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -1703,7 +1703,7 @@ static struct ccw_device_id tape_3590_ids[] = { | |||
1703 | static int | 1703 | static int |
1704 | tape_3590_online(struct ccw_device *cdev) | 1704 | tape_3590_online(struct ccw_device *cdev) |
1705 | { | 1705 | { |
1706 | return tape_generic_online(cdev->dev.driver_data, | 1706 | return tape_generic_online(dev_get_drvdata(&cdev->dev), |
1707 | &tape_discipline_3590); | 1707 | &tape_discipline_3590); |
1708 | } | 1708 | } |
1709 | 1709 | ||
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 8a109f3b69c6..dfeb0d445fd7 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -92,7 +92,7 @@ tape_medium_state_show(struct device *dev, struct device_attribute *attr, char * | |||
92 | { | 92 | { |
93 | struct tape_device *tdev; | 93 | struct tape_device *tdev; |
94 | 94 | ||
95 | tdev = (struct tape_device *) dev->driver_data; | 95 | tdev = dev_get_drvdata(dev); |
96 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->medium_state); | 96 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->medium_state); |
97 | } | 97 | } |
98 | 98 | ||
@@ -104,7 +104,7 @@ tape_first_minor_show(struct device *dev, struct device_attribute *attr, char *b | |||
104 | { | 104 | { |
105 | struct tape_device *tdev; | 105 | struct tape_device *tdev; |
106 | 106 | ||
107 | tdev = (struct tape_device *) dev->driver_data; | 107 | tdev = dev_get_drvdata(dev); |
108 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->first_minor); | 108 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->first_minor); |
109 | } | 109 | } |
110 | 110 | ||
@@ -116,7 +116,7 @@ tape_state_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
116 | { | 116 | { |
117 | struct tape_device *tdev; | 117 | struct tape_device *tdev; |
118 | 118 | ||
119 | tdev = (struct tape_device *) dev->driver_data; | 119 | tdev = dev_get_drvdata(dev); |
120 | return scnprintf(buf, PAGE_SIZE, "%s\n", (tdev->first_minor < 0) ? | 120 | return scnprintf(buf, PAGE_SIZE, "%s\n", (tdev->first_minor < 0) ? |
121 | "OFFLINE" : tape_state_verbose[tdev->tape_state]); | 121 | "OFFLINE" : tape_state_verbose[tdev->tape_state]); |
122 | } | 122 | } |
@@ -130,7 +130,7 @@ tape_operation_show(struct device *dev, struct device_attribute *attr, char *buf | |||
130 | struct tape_device *tdev; | 130 | struct tape_device *tdev; |
131 | ssize_t rc; | 131 | ssize_t rc; |
132 | 132 | ||
133 | tdev = (struct tape_device *) dev->driver_data; | 133 | tdev = dev_get_drvdata(dev); |
134 | if (tdev->first_minor < 0) | 134 | if (tdev->first_minor < 0) |
135 | return scnprintf(buf, PAGE_SIZE, "N/A\n"); | 135 | return scnprintf(buf, PAGE_SIZE, "N/A\n"); |
136 | 136 | ||
@@ -156,7 +156,7 @@ tape_blocksize_show(struct device *dev, struct device_attribute *attr, char *buf | |||
156 | { | 156 | { |
157 | struct tape_device *tdev; | 157 | struct tape_device *tdev; |
158 | 158 | ||
159 | tdev = (struct tape_device *) dev->driver_data; | 159 | tdev = dev_get_drvdata(dev); |
160 | 160 | ||
161 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->char_data.block_size); | 161 | return scnprintf(buf, PAGE_SIZE, "%i\n", tdev->char_data.block_size); |
162 | } | 162 | } |
@@ -391,7 +391,7 @@ tape_generic_offline(struct ccw_device *cdev) | |||
391 | { | 391 | { |
392 | struct tape_device *device; | 392 | struct tape_device *device; |
393 | 393 | ||
394 | device = cdev->dev.driver_data; | 394 | device = dev_get_drvdata(&cdev->dev); |
395 | if (!device) { | 395 | if (!device) { |
396 | return -ENODEV; | 396 | return -ENODEV; |
397 | } | 397 | } |
@@ -534,7 +534,7 @@ tape_generic_probe(struct ccw_device *cdev) | |||
534 | tape_put_device(device); | 534 | tape_put_device(device); |
535 | return ret; | 535 | return ret; |
536 | } | 536 | } |
537 | cdev->dev.driver_data = device; | 537 | dev_set_drvdata(&cdev->dev, device); |
538 | cdev->handler = __tape_do_irq; | 538 | cdev->handler = __tape_do_irq; |
539 | device->cdev = cdev; | 539 | device->cdev = cdev; |
540 | ccw_device_get_id(cdev, &dev_id); | 540 | ccw_device_get_id(cdev, &dev_id); |
@@ -573,7 +573,7 @@ tape_generic_remove(struct ccw_device *cdev) | |||
573 | { | 573 | { |
574 | struct tape_device * device; | 574 | struct tape_device * device; |
575 | 575 | ||
576 | device = cdev->dev.driver_data; | 576 | device = dev_get_drvdata(&cdev->dev); |
577 | if (!device) { | 577 | if (!device) { |
578 | return; | 578 | return; |
579 | } | 579 | } |
@@ -613,9 +613,9 @@ tape_generic_remove(struct ccw_device *cdev) | |||
613 | tape_cleanup_device(device); | 613 | tape_cleanup_device(device); |
614 | } | 614 | } |
615 | 615 | ||
616 | if (cdev->dev.driver_data != NULL) { | 616 | if (!dev_get_drvdata(&cdev->dev)) { |
617 | sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); | 617 | sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); |
618 | cdev->dev.driver_data = tape_put_device(cdev->dev.driver_data); | 618 | dev_set_drvdata(&cdev->dev, tape_put_device(dev_get_drvdata(&cdev->dev))); |
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
@@ -1011,7 +1011,7 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1011 | struct tape_request *request; | 1011 | struct tape_request *request; |
1012 | int rc; | 1012 | int rc; |
1013 | 1013 | ||
1014 | device = (struct tape_device *) cdev->dev.driver_data; | 1014 | device = dev_get_drvdata(&cdev->dev); |
1015 | if (device == NULL) { | 1015 | if (device == NULL) { |
1016 | return; | 1016 | return; |
1017 | } | 1017 | } |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index d8a2289fcb69..ee1b418b0d8a 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -504,7 +504,7 @@ static ssize_t vmlogrdr_autopurge_store(struct device * dev, | |||
504 | struct device_attribute *attr, | 504 | struct device_attribute *attr, |
505 | const char * buf, size_t count) | 505 | const char * buf, size_t count) |
506 | { | 506 | { |
507 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 507 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
508 | ssize_t ret = count; | 508 | ssize_t ret = count; |
509 | 509 | ||
510 | switch (buf[0]) { | 510 | switch (buf[0]) { |
@@ -525,7 +525,7 @@ static ssize_t vmlogrdr_autopurge_show(struct device *dev, | |||
525 | struct device_attribute *attr, | 525 | struct device_attribute *attr, |
526 | char *buf) | 526 | char *buf) |
527 | { | 527 | { |
528 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 528 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
529 | return sprintf(buf, "%u\n", priv->autopurge); | 529 | return sprintf(buf, "%u\n", priv->autopurge); |
530 | } | 530 | } |
531 | 531 | ||
@@ -541,7 +541,7 @@ static ssize_t vmlogrdr_purge_store(struct device * dev, | |||
541 | 541 | ||
542 | char cp_command[80]; | 542 | char cp_command[80]; |
543 | char cp_response[80]; | 543 | char cp_response[80]; |
544 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 544 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
545 | 545 | ||
546 | if (buf[0] != '1') | 546 | if (buf[0] != '1') |
547 | return -EINVAL; | 547 | return -EINVAL; |
@@ -578,7 +578,7 @@ static ssize_t vmlogrdr_autorecording_store(struct device *dev, | |||
578 | struct device_attribute *attr, | 578 | struct device_attribute *attr, |
579 | const char *buf, size_t count) | 579 | const char *buf, size_t count) |
580 | { | 580 | { |
581 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 581 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
582 | ssize_t ret = count; | 582 | ssize_t ret = count; |
583 | 583 | ||
584 | switch (buf[0]) { | 584 | switch (buf[0]) { |
@@ -599,7 +599,7 @@ static ssize_t vmlogrdr_autorecording_show(struct device *dev, | |||
599 | struct device_attribute *attr, | 599 | struct device_attribute *attr, |
600 | char *buf) | 600 | char *buf) |
601 | { | 601 | { |
602 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 602 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
603 | return sprintf(buf, "%u\n", priv->autorecording); | 603 | return sprintf(buf, "%u\n", priv->autorecording); |
604 | } | 604 | } |
605 | 605 | ||
@@ -612,7 +612,7 @@ static ssize_t vmlogrdr_recording_store(struct device * dev, | |||
612 | struct device_attribute *attr, | 612 | struct device_attribute *attr, |
613 | const char * buf, size_t count) | 613 | const char * buf, size_t count) |
614 | { | 614 | { |
615 | struct vmlogrdr_priv_t *priv = dev->driver_data; | 615 | struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); |
616 | ssize_t ret; | 616 | ssize_t ret; |
617 | 617 | ||
618 | switch (buf[0]) { | 618 | switch (buf[0]) { |
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 5dcef81fc9d9..6492b2015dd4 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -78,11 +78,11 @@ static DEFINE_MUTEX(vmur_mutex); | |||
78 | * | 78 | * |
79 | * Each ur device (urd) contains a reference to its corresponding ccw device | 79 | * Each ur device (urd) contains a reference to its corresponding ccw device |
80 | * (cdev) using the urd->cdev pointer. Each ccw device has a reference to the | 80 | * (cdev) using the urd->cdev pointer. Each ccw device has a reference to the |
81 | * ur device using the cdev->dev.driver_data pointer. | 81 | * ur device using dev_get_drvdata(&cdev->dev) pointer. |
82 | * | 82 | * |
83 | * urd references: | 83 | * urd references: |
84 | * - ur_probe gets a urd reference, ur_remove drops the reference | 84 | * - ur_probe gets a urd reference, ur_remove drops the reference |
85 | * (cdev->dev.driver_data) | 85 | * dev_get_drvdata(&cdev->dev) |
86 | * - ur_open gets a urd reference, ur_relase drops the reference | 86 | * - ur_open gets a urd reference, ur_relase drops the reference |
87 | * (urf->urd) | 87 | * (urf->urd) |
88 | * | 88 | * |
@@ -90,7 +90,7 @@ static DEFINE_MUTEX(vmur_mutex); | |||
90 | * - urdev_alloc get a cdev reference (urd->cdev) | 90 | * - urdev_alloc get a cdev reference (urd->cdev) |
91 | * - urdev_free drops the cdev reference (urd->cdev) | 91 | * - urdev_free drops the cdev reference (urd->cdev) |
92 | * | 92 | * |
93 | * Setting and clearing of cdev->dev.driver_data is protected by the ccwdev lock | 93 | * Setting and clearing of dev_get_drvdata(&cdev->dev) is protected by the ccwdev lock |
94 | */ | 94 | */ |
95 | static struct urdev *urdev_alloc(struct ccw_device *cdev) | 95 | static struct urdev *urdev_alloc(struct ccw_device *cdev) |
96 | { | 96 | { |
@@ -129,7 +129,7 @@ static struct urdev *urdev_get_from_cdev(struct ccw_device *cdev) | |||
129 | unsigned long flags; | 129 | unsigned long flags; |
130 | 130 | ||
131 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); | 131 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); |
132 | urd = cdev->dev.driver_data; | 132 | urd = dev_get_drvdata(&cdev->dev); |
133 | if (urd) | 133 | if (urd) |
134 | urdev_get(urd); | 134 | urdev_get(urd); |
135 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); | 135 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); |
@@ -286,7 +286,7 @@ static void ur_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
286 | TRACE("ur_int_handler: unsolicited interrupt\n"); | 286 | TRACE("ur_int_handler: unsolicited interrupt\n"); |
287 | return; | 287 | return; |
288 | } | 288 | } |
289 | urd = cdev->dev.driver_data; | 289 | urd = dev_get_drvdata(&cdev->dev); |
290 | BUG_ON(!urd); | 290 | BUG_ON(!urd); |
291 | /* On special conditions irb is an error pointer */ | 291 | /* On special conditions irb is an error pointer */ |
292 | if (IS_ERR(irb)) | 292 | if (IS_ERR(irb)) |
@@ -832,7 +832,7 @@ static int ur_probe(struct ccw_device *cdev) | |||
832 | goto fail_remove_attr; | 832 | goto fail_remove_attr; |
833 | } | 833 | } |
834 | spin_lock_irq(get_ccwdev_lock(cdev)); | 834 | spin_lock_irq(get_ccwdev_lock(cdev)); |
835 | cdev->dev.driver_data = urd; | 835 | dev_set_drvdata(&cdev->dev, urd); |
836 | spin_unlock_irq(get_ccwdev_lock(cdev)); | 836 | spin_unlock_irq(get_ccwdev_lock(cdev)); |
837 | 837 | ||
838 | mutex_unlock(&vmur_mutex); | 838 | mutex_unlock(&vmur_mutex); |
@@ -972,8 +972,8 @@ static void ur_remove(struct ccw_device *cdev) | |||
972 | ur_remove_attributes(&cdev->dev); | 972 | ur_remove_attributes(&cdev->dev); |
973 | 973 | ||
974 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); | 974 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); |
975 | urdev_put(cdev->dev.driver_data); | 975 | urdev_put(dev_get_drvdata(&cdev->dev)); |
976 | cdev->dev.driver_data = NULL; | 976 | dev_set_drvdata(&cdev->dev, NULL); |
977 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); | 977 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); |
978 | 978 | ||
979 | mutex_unlock(&vmur_mutex); | 979 | mutex_unlock(&vmur_mutex); |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 7b6f46ddf3c3..1b34233cf6d5 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -284,7 +284,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
284 | if (!get_device(&cgdev->dev)) | 284 | if (!get_device(&cgdev->dev)) |
285 | return -ENODEV; | 285 | return -ENODEV; |
286 | privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL); | 286 | privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL); |
287 | cgdev->dev.driver_data = privptr; | 287 | dev_set_drvdata(&cgdev->dev, privptr); |
288 | if (privptr == NULL) { | 288 | if (privptr == NULL) { |
289 | probe_error(cgdev); | 289 | probe_error(cgdev); |
290 | put_device(&cgdev->dev); | 290 | put_device(&cgdev->dev); |
@@ -591,14 +591,14 @@ claw_irq_handler(struct ccw_device *cdev, | |||
591 | 591 | ||
592 | CLAW_DBF_TEXT(4, trace, "clawirq"); | 592 | CLAW_DBF_TEXT(4, trace, "clawirq"); |
593 | /* Bypass all 'unsolicited interrupts' */ | 593 | /* Bypass all 'unsolicited interrupts' */ |
594 | if (!cdev->dev.driver_data) { | 594 | privptr = dev_get_drvdata(&cdev->dev); |
595 | if (!privptr) { | ||
595 | dev_warn(&cdev->dev, "An uninitialized CLAW device received an" | 596 | dev_warn(&cdev->dev, "An uninitialized CLAW device received an" |
596 | " IRQ, c-%02x d-%02x\n", | 597 | " IRQ, c-%02x d-%02x\n", |
597 | irb->scsw.cmd.cstat, irb->scsw.cmd.dstat); | 598 | irb->scsw.cmd.cstat, irb->scsw.cmd.dstat); |
598 | CLAW_DBF_TEXT(2, trace, "badirq"); | 599 | CLAW_DBF_TEXT(2, trace, "badirq"); |
599 | return; | 600 | return; |
600 | } | 601 | } |
601 | privptr = (struct claw_privbk *)cdev->dev.driver_data; | ||
602 | 602 | ||
603 | /* Try to extract channel from driver data. */ | 603 | /* Try to extract channel from driver data. */ |
604 | if (privptr->channel[READ].cdev == cdev) | 604 | if (privptr->channel[READ].cdev == cdev) |
@@ -1980,9 +1980,9 @@ probe_error( struct ccwgroup_device *cgdev) | |||
1980 | struct claw_privbk *privptr; | 1980 | struct claw_privbk *privptr; |
1981 | 1981 | ||
1982 | CLAW_DBF_TEXT(4, trace, "proberr"); | 1982 | CLAW_DBF_TEXT(4, trace, "proberr"); |
1983 | privptr = (struct claw_privbk *) cgdev->dev.driver_data; | 1983 | privptr = dev_get_drvdata(&cgdev->dev); |
1984 | if (privptr != NULL) { | 1984 | if (privptr != NULL) { |
1985 | cgdev->dev.driver_data = NULL; | 1985 | dev_set_drvdata(&cgdev->dev, NULL); |
1986 | kfree(privptr->p_env); | 1986 | kfree(privptr->p_env); |
1987 | kfree(privptr->p_mtc_envelope); | 1987 | kfree(privptr->p_mtc_envelope); |
1988 | kfree(privptr); | 1988 | kfree(privptr); |
@@ -2911,9 +2911,9 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2911 | dev_info(&cgdev->dev, "add for %s\n", | 2911 | dev_info(&cgdev->dev, "add for %s\n", |
2912 | dev_name(&cgdev->cdev[READ]->dev)); | 2912 | dev_name(&cgdev->cdev[READ]->dev)); |
2913 | CLAW_DBF_TEXT(2, setup, "new_dev"); | 2913 | CLAW_DBF_TEXT(2, setup, "new_dev"); |
2914 | privptr = cgdev->dev.driver_data; | 2914 | privptr = dev_get_drvdata(&cgdev->dev); |
2915 | cgdev->cdev[READ]->dev.driver_data = privptr; | 2915 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); |
2916 | cgdev->cdev[WRITE]->dev.driver_data = privptr; | 2916 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); |
2917 | if (!privptr) | 2917 | if (!privptr) |
2918 | return -ENODEV; | 2918 | return -ENODEV; |
2919 | p_env = privptr->p_env; | 2919 | p_env = privptr->p_env; |
@@ -2950,9 +2950,9 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2950 | goto out; | 2950 | goto out; |
2951 | } | 2951 | } |
2952 | dev->ml_priv = privptr; | 2952 | dev->ml_priv = privptr; |
2953 | cgdev->dev.driver_data = privptr; | 2953 | dev_set_drvdata(&cgdev->dev, privptr); |
2954 | cgdev->cdev[READ]->dev.driver_data = privptr; | 2954 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); |
2955 | cgdev->cdev[WRITE]->dev.driver_data = privptr; | 2955 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); |
2956 | /* sysfs magic */ | 2956 | /* sysfs magic */ |
2957 | SET_NETDEV_DEV(dev, &cgdev->dev); | 2957 | SET_NETDEV_DEV(dev, &cgdev->dev); |
2958 | if (register_netdev(dev) != 0) { | 2958 | if (register_netdev(dev) != 0) { |
@@ -3018,7 +3018,7 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
3018 | int ret; | 3018 | int ret; |
3019 | 3019 | ||
3020 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); | 3020 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); |
3021 | priv = cgdev->dev.driver_data; | 3021 | priv = dev_get_drvdata(&cgdev->dev); |
3022 | if (!priv) | 3022 | if (!priv) |
3023 | return -ENODEV; | 3023 | return -ENODEV; |
3024 | ndev = priv->channel[READ].ndev; | 3024 | ndev = priv->channel[READ].ndev; |
@@ -3048,7 +3048,7 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
3048 | 3048 | ||
3049 | BUG_ON(!cgdev); | 3049 | BUG_ON(!cgdev); |
3050 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); | 3050 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); |
3051 | priv = cgdev->dev.driver_data; | 3051 | priv = dev_get_drvdata(&cgdev->dev); |
3052 | BUG_ON(!priv); | 3052 | BUG_ON(!priv); |
3053 | dev_info(&cgdev->dev, " will be removed.\n"); | 3053 | dev_info(&cgdev->dev, " will be removed.\n"); |
3054 | if (cgdev->state == CCWGROUP_ONLINE) | 3054 | if (cgdev->state == CCWGROUP_ONLINE) |
@@ -3063,9 +3063,9 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
3063 | kfree(priv->channel[1].irb); | 3063 | kfree(priv->channel[1].irb); |
3064 | priv->channel[1].irb=NULL; | 3064 | priv->channel[1].irb=NULL; |
3065 | kfree(priv); | 3065 | kfree(priv); |
3066 | cgdev->dev.driver_data=NULL; | 3066 | dev_set_drvdata(&cgdev->dev, NULL); |
3067 | cgdev->cdev[READ]->dev.driver_data = NULL; | 3067 | dev_set_drvdata(&cgdev->cdev[READ]->dev, NULL); |
3068 | cgdev->cdev[WRITE]->dev.driver_data = NULL; | 3068 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, NULL); |
3069 | put_device(&cgdev->dev); | 3069 | put_device(&cgdev->dev); |
3070 | 3070 | ||
3071 | return; | 3071 | return; |
@@ -3081,7 +3081,7 @@ claw_hname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3081 | struct claw_privbk *priv; | 3081 | struct claw_privbk *priv; |
3082 | struct claw_env * p_env; | 3082 | struct claw_env * p_env; |
3083 | 3083 | ||
3084 | priv = dev->driver_data; | 3084 | priv = dev_get_drvdata(dev); |
3085 | if (!priv) | 3085 | if (!priv) |
3086 | return -ENODEV; | 3086 | return -ENODEV; |
3087 | p_env = priv->p_env; | 3087 | p_env = priv->p_env; |
@@ -3095,7 +3095,7 @@ claw_hname_write(struct device *dev, struct device_attribute *attr, | |||
3095 | struct claw_privbk *priv; | 3095 | struct claw_privbk *priv; |
3096 | struct claw_env * p_env; | 3096 | struct claw_env * p_env; |
3097 | 3097 | ||
3098 | priv = dev->driver_data; | 3098 | priv = dev_get_drvdata(dev); |
3099 | if (!priv) | 3099 | if (!priv) |
3100 | return -ENODEV; | 3100 | return -ENODEV; |
3101 | p_env = priv->p_env; | 3101 | p_env = priv->p_env; |
@@ -3119,7 +3119,7 @@ claw_adname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3119 | struct claw_privbk *priv; | 3119 | struct claw_privbk *priv; |
3120 | struct claw_env * p_env; | 3120 | struct claw_env * p_env; |
3121 | 3121 | ||
3122 | priv = dev->driver_data; | 3122 | priv = dev_get_drvdata(dev); |
3123 | if (!priv) | 3123 | if (!priv) |
3124 | return -ENODEV; | 3124 | return -ENODEV; |
3125 | p_env = priv->p_env; | 3125 | p_env = priv->p_env; |
@@ -3133,7 +3133,7 @@ claw_adname_write(struct device *dev, struct device_attribute *attr, | |||
3133 | struct claw_privbk *priv; | 3133 | struct claw_privbk *priv; |
3134 | struct claw_env * p_env; | 3134 | struct claw_env * p_env; |
3135 | 3135 | ||
3136 | priv = dev->driver_data; | 3136 | priv = dev_get_drvdata(dev); |
3137 | if (!priv) | 3137 | if (!priv) |
3138 | return -ENODEV; | 3138 | return -ENODEV; |
3139 | p_env = priv->p_env; | 3139 | p_env = priv->p_env; |
@@ -3157,7 +3157,7 @@ claw_apname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3157 | struct claw_privbk *priv; | 3157 | struct claw_privbk *priv; |
3158 | struct claw_env * p_env; | 3158 | struct claw_env * p_env; |
3159 | 3159 | ||
3160 | priv = dev->driver_data; | 3160 | priv = dev_get_drvdata(dev); |
3161 | if (!priv) | 3161 | if (!priv) |
3162 | return -ENODEV; | 3162 | return -ENODEV; |
3163 | p_env = priv->p_env; | 3163 | p_env = priv->p_env; |
@@ -3172,7 +3172,7 @@ claw_apname_write(struct device *dev, struct device_attribute *attr, | |||
3172 | struct claw_privbk *priv; | 3172 | struct claw_privbk *priv; |
3173 | struct claw_env * p_env; | 3173 | struct claw_env * p_env; |
3174 | 3174 | ||
3175 | priv = dev->driver_data; | 3175 | priv = dev_get_drvdata(dev); |
3176 | if (!priv) | 3176 | if (!priv) |
3177 | return -ENODEV; | 3177 | return -ENODEV; |
3178 | p_env = priv->p_env; | 3178 | p_env = priv->p_env; |
@@ -3206,7 +3206,7 @@ claw_wbuff_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3206 | struct claw_privbk *priv; | 3206 | struct claw_privbk *priv; |
3207 | struct claw_env * p_env; | 3207 | struct claw_env * p_env; |
3208 | 3208 | ||
3209 | priv = dev->driver_data; | 3209 | priv = dev_get_drvdata(dev); |
3210 | if (!priv) | 3210 | if (!priv) |
3211 | return -ENODEV; | 3211 | return -ENODEV; |
3212 | p_env = priv->p_env; | 3212 | p_env = priv->p_env; |
@@ -3221,7 +3221,7 @@ claw_wbuff_write(struct device *dev, struct device_attribute *attr, | |||
3221 | struct claw_env * p_env; | 3221 | struct claw_env * p_env; |
3222 | int nnn,max; | 3222 | int nnn,max; |
3223 | 3223 | ||
3224 | priv = dev->driver_data; | 3224 | priv = dev_get_drvdata(dev); |
3225 | if (!priv) | 3225 | if (!priv) |
3226 | return -ENODEV; | 3226 | return -ENODEV; |
3227 | p_env = priv->p_env; | 3227 | p_env = priv->p_env; |
@@ -3248,7 +3248,7 @@ claw_rbuff_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3248 | struct claw_privbk *priv; | 3248 | struct claw_privbk *priv; |
3249 | struct claw_env * p_env; | 3249 | struct claw_env * p_env; |
3250 | 3250 | ||
3251 | priv = dev->driver_data; | 3251 | priv = dev_get_drvdata(dev); |
3252 | if (!priv) | 3252 | if (!priv) |
3253 | return -ENODEV; | 3253 | return -ENODEV; |
3254 | p_env = priv->p_env; | 3254 | p_env = priv->p_env; |
@@ -3263,7 +3263,7 @@ claw_rbuff_write(struct device *dev, struct device_attribute *attr, | |||
3263 | struct claw_env *p_env; | 3263 | struct claw_env *p_env; |
3264 | int nnn,max; | 3264 | int nnn,max; |
3265 | 3265 | ||
3266 | priv = dev->driver_data; | 3266 | priv = dev_get_drvdata(dev); |
3267 | if (!priv) | 3267 | if (!priv) |
3268 | return -ENODEV; | 3268 | return -ENODEV; |
3269 | p_env = priv->p_env; | 3269 | p_env = priv->p_env; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index a45bc24eb5f9..ba6d45d29ad4 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1939,7 +1939,7 @@ lcs_portno_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
1939 | { | 1939 | { |
1940 | struct lcs_card *card; | 1940 | struct lcs_card *card; |
1941 | 1941 | ||
1942 | card = (struct lcs_card *)dev->driver_data; | 1942 | card = dev_get_drvdata(dev); |
1943 | 1943 | ||
1944 | if (!card) | 1944 | if (!card) |
1945 | return 0; | 1945 | return 0; |
@@ -1956,7 +1956,7 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char | |||
1956 | struct lcs_card *card; | 1956 | struct lcs_card *card; |
1957 | int value; | 1957 | int value; |
1958 | 1958 | ||
1959 | card = (struct lcs_card *)dev->driver_data; | 1959 | card = dev_get_drvdata(dev); |
1960 | 1960 | ||
1961 | if (!card) | 1961 | if (!card) |
1962 | return 0; | 1962 | return 0; |
@@ -1990,7 +1990,7 @@ lcs_timeout_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
1990 | { | 1990 | { |
1991 | struct lcs_card *card; | 1991 | struct lcs_card *card; |
1992 | 1992 | ||
1993 | card = (struct lcs_card *)dev->driver_data; | 1993 | card = dev_get_drvdata(dev); |
1994 | 1994 | ||
1995 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; | 1995 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; |
1996 | } | 1996 | } |
@@ -2001,7 +2001,7 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char | |||
2001 | struct lcs_card *card; | 2001 | struct lcs_card *card; |
2002 | int value; | 2002 | int value; |
2003 | 2003 | ||
2004 | card = (struct lcs_card *)dev->driver_data; | 2004 | card = dev_get_drvdata(dev); |
2005 | 2005 | ||
2006 | if (!card) | 2006 | if (!card) |
2007 | return 0; | 2007 | return 0; |
@@ -2020,7 +2020,7 @@ static ssize_t | |||
2020 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, | 2020 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, |
2021 | const char *buf, size_t count) | 2021 | const char *buf, size_t count) |
2022 | { | 2022 | { |
2023 | struct lcs_card *card = dev->driver_data; | 2023 | struct lcs_card *card = dev_get_drvdata(dev); |
2024 | char *tmp; | 2024 | char *tmp; |
2025 | int i; | 2025 | int i; |
2026 | 2026 | ||
@@ -2073,7 +2073,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev) | |||
2073 | put_device(&ccwgdev->dev); | 2073 | put_device(&ccwgdev->dev); |
2074 | return ret; | 2074 | return ret; |
2075 | } | 2075 | } |
2076 | ccwgdev->dev.driver_data = card; | 2076 | dev_set_drvdata(&ccwgdev->dev, card); |
2077 | ccwgdev->cdev[0]->handler = lcs_irq; | 2077 | ccwgdev->cdev[0]->handler = lcs_irq; |
2078 | ccwgdev->cdev[1]->handler = lcs_irq; | 2078 | ccwgdev->cdev[1]->handler = lcs_irq; |
2079 | card->gdev = ccwgdev; | 2079 | card->gdev = ccwgdev; |
@@ -2090,7 +2090,7 @@ lcs_register_netdev(struct ccwgroup_device *ccwgdev) | |||
2090 | struct lcs_card *card; | 2090 | struct lcs_card *card; |
2091 | 2091 | ||
2092 | LCS_DBF_TEXT(2, setup, "regnetdv"); | 2092 | LCS_DBF_TEXT(2, setup, "regnetdv"); |
2093 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2093 | card = dev_get_drvdata(&ccwgdev->dev); |
2094 | if (card->dev->reg_state != NETREG_UNINITIALIZED) | 2094 | if (card->dev->reg_state != NETREG_UNINITIALIZED) |
2095 | return 0; | 2095 | return 0; |
2096 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); | 2096 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); |
@@ -2123,7 +2123,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev) | |||
2123 | enum lcs_dev_states recover_state; | 2123 | enum lcs_dev_states recover_state; |
2124 | int rc; | 2124 | int rc; |
2125 | 2125 | ||
2126 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2126 | card = dev_get_drvdata(&ccwgdev->dev); |
2127 | if (!card) | 2127 | if (!card) |
2128 | return -ENODEV; | 2128 | return -ENODEV; |
2129 | 2129 | ||
@@ -2229,7 +2229,7 @@ __lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode) | |||
2229 | int ret; | 2229 | int ret; |
2230 | 2230 | ||
2231 | LCS_DBF_TEXT(3, setup, "shtdndev"); | 2231 | LCS_DBF_TEXT(3, setup, "shtdndev"); |
2232 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2232 | card = dev_get_drvdata(&ccwgdev->dev); |
2233 | if (!card) | 2233 | if (!card) |
2234 | return -ENODEV; | 2234 | return -ENODEV; |
2235 | if (recovery_mode == 0) { | 2235 | if (recovery_mode == 0) { |
@@ -2296,7 +2296,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev) | |||
2296 | { | 2296 | { |
2297 | struct lcs_card *card; | 2297 | struct lcs_card *card; |
2298 | 2298 | ||
2299 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2299 | card = dev_get_drvdata(&ccwgdev->dev); |
2300 | if (!card) | 2300 | if (!card) |
2301 | return; | 2301 | return; |
2302 | 2302 | ||
diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index d58fea52557d..6d668642af27 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h | |||
@@ -34,8 +34,8 @@ static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level) | |||
34 | * sysfs related stuff | 34 | * sysfs related stuff |
35 | */ | 35 | */ |
36 | #define CARD_FROM_DEV(cdev) \ | 36 | #define CARD_FROM_DEV(cdev) \ |
37 | (struct lcs_card *) \ | 37 | (struct lcs_card *) dev_get_drvdata( \ |
38 | ((struct ccwgroup_device *)cdev->dev.driver_data)->dev.driver_data; | 38 | &((struct ccwgroup_device *)dev_get_drvdata(&cdev->dev))->dev); |
39 | /** | 39 | /** |
40 | * CCW commands used in this driver | 40 | * CCW commands used in this driver |
41 | */ | 41 | */ |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index aec9e5d3cf4b..d52a99f9b702 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1364,7 +1364,7 @@ static int netiucv_change_mtu(struct net_device * dev, int new_mtu) | |||
1364 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, | 1364 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, |
1365 | char *buf) | 1365 | char *buf) |
1366 | { | 1366 | { |
1367 | struct netiucv_priv *priv = dev->driver_data; | 1367 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1368 | 1368 | ||
1369 | IUCV_DBF_TEXT(trace, 5, __func__); | 1369 | IUCV_DBF_TEXT(trace, 5, __func__); |
1370 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); | 1370 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); |
@@ -1373,7 +1373,7 @@ static ssize_t user_show(struct device *dev, struct device_attribute *attr, | |||
1373 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, | 1373 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, |
1374 | const char *buf, size_t count) | 1374 | const char *buf, size_t count) |
1375 | { | 1375 | { |
1376 | struct netiucv_priv *priv = dev->driver_data; | 1376 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1377 | struct net_device *ndev = priv->conn->netdev; | 1377 | struct net_device *ndev = priv->conn->netdev; |
1378 | char *p; | 1378 | char *p; |
1379 | char *tmp; | 1379 | char *tmp; |
@@ -1430,7 +1430,8 @@ static DEVICE_ATTR(user, 0644, user_show, user_write); | |||
1430 | 1430 | ||
1431 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | 1431 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, |
1432 | char *buf) | 1432 | char *buf) |
1433 | { struct netiucv_priv *priv = dev->driver_data; | 1433 | { |
1434 | struct netiucv_priv *priv = dev_get_drvdata(dev); | ||
1434 | 1435 | ||
1435 | IUCV_DBF_TEXT(trace, 5, __func__); | 1436 | IUCV_DBF_TEXT(trace, 5, __func__); |
1436 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); | 1437 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); |
@@ -1439,7 +1440,7 @@ static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | |||
1439 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, | 1440 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, |
1440 | const char *buf, size_t count) | 1441 | const char *buf, size_t count) |
1441 | { | 1442 | { |
1442 | struct netiucv_priv *priv = dev->driver_data; | 1443 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1443 | struct net_device *ndev = priv->conn->netdev; | 1444 | struct net_device *ndev = priv->conn->netdev; |
1444 | char *e; | 1445 | char *e; |
1445 | int bs1; | 1446 | int bs1; |
@@ -1487,7 +1488,7 @@ static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write); | |||
1487 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, | 1488 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, |
1488 | char *buf) | 1489 | char *buf) |
1489 | { | 1490 | { |
1490 | struct netiucv_priv *priv = dev->driver_data; | 1491 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1491 | 1492 | ||
1492 | IUCV_DBF_TEXT(trace, 5, __func__); | 1493 | IUCV_DBF_TEXT(trace, 5, __func__); |
1493 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); | 1494 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); |
@@ -1498,7 +1499,7 @@ static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL); | |||
1498 | static ssize_t conn_fsm_show (struct device *dev, | 1499 | static ssize_t conn_fsm_show (struct device *dev, |
1499 | struct device_attribute *attr, char *buf) | 1500 | struct device_attribute *attr, char *buf) |
1500 | { | 1501 | { |
1501 | struct netiucv_priv *priv = dev->driver_data; | 1502 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1502 | 1503 | ||
1503 | IUCV_DBF_TEXT(trace, 5, __func__); | 1504 | IUCV_DBF_TEXT(trace, 5, __func__); |
1504 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); | 1505 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); |
@@ -1509,7 +1510,7 @@ static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL); | |||
1509 | static ssize_t maxmulti_show (struct device *dev, | 1510 | static ssize_t maxmulti_show (struct device *dev, |
1510 | struct device_attribute *attr, char *buf) | 1511 | struct device_attribute *attr, char *buf) |
1511 | { | 1512 | { |
1512 | struct netiucv_priv *priv = dev->driver_data; | 1513 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1513 | 1514 | ||
1514 | IUCV_DBF_TEXT(trace, 5, __func__); | 1515 | IUCV_DBF_TEXT(trace, 5, __func__); |
1515 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); | 1516 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); |
@@ -1519,7 +1520,7 @@ static ssize_t maxmulti_write (struct device *dev, | |||
1519 | struct device_attribute *attr, | 1520 | struct device_attribute *attr, |
1520 | const char *buf, size_t count) | 1521 | const char *buf, size_t count) |
1521 | { | 1522 | { |
1522 | struct netiucv_priv *priv = dev->driver_data; | 1523 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1523 | 1524 | ||
1524 | IUCV_DBF_TEXT(trace, 4, __func__); | 1525 | IUCV_DBF_TEXT(trace, 4, __func__); |
1525 | priv->conn->prof.maxmulti = 0; | 1526 | priv->conn->prof.maxmulti = 0; |
@@ -1531,7 +1532,7 @@ static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write); | |||
1531 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | 1532 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, |
1532 | char *buf) | 1533 | char *buf) |
1533 | { | 1534 | { |
1534 | struct netiucv_priv *priv = dev->driver_data; | 1535 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1535 | 1536 | ||
1536 | IUCV_DBF_TEXT(trace, 5, __func__); | 1537 | IUCV_DBF_TEXT(trace, 5, __func__); |
1537 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); | 1538 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); |
@@ -1540,7 +1541,7 @@ static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | |||
1540 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, | 1541 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, |
1541 | const char *buf, size_t count) | 1542 | const char *buf, size_t count) |
1542 | { | 1543 | { |
1543 | struct netiucv_priv *priv = dev->driver_data; | 1544 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1544 | 1545 | ||
1545 | IUCV_DBF_TEXT(trace, 4, __func__); | 1546 | IUCV_DBF_TEXT(trace, 4, __func__); |
1546 | priv->conn->prof.maxcqueue = 0; | 1547 | priv->conn->prof.maxcqueue = 0; |
@@ -1552,7 +1553,7 @@ static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write); | |||
1552 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | 1553 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, |
1553 | char *buf) | 1554 | char *buf) |
1554 | { | 1555 | { |
1555 | struct netiucv_priv *priv = dev->driver_data; | 1556 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1556 | 1557 | ||
1557 | IUCV_DBF_TEXT(trace, 5, __func__); | 1558 | IUCV_DBF_TEXT(trace, 5, __func__); |
1558 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); | 1559 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); |
@@ -1561,7 +1562,7 @@ static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | |||
1561 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, | 1562 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, |
1562 | const char *buf, size_t count) | 1563 | const char *buf, size_t count) |
1563 | { | 1564 | { |
1564 | struct netiucv_priv *priv = dev->driver_data; | 1565 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1565 | 1566 | ||
1566 | IUCV_DBF_TEXT(trace, 4, __func__); | 1567 | IUCV_DBF_TEXT(trace, 4, __func__); |
1567 | priv->conn->prof.doios_single = 0; | 1568 | priv->conn->prof.doios_single = 0; |
@@ -1573,7 +1574,7 @@ static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write); | |||
1573 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | 1574 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, |
1574 | char *buf) | 1575 | char *buf) |
1575 | { | 1576 | { |
1576 | struct netiucv_priv *priv = dev->driver_data; | 1577 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1577 | 1578 | ||
1578 | IUCV_DBF_TEXT(trace, 5, __func__); | 1579 | IUCV_DBF_TEXT(trace, 5, __func__); |
1579 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); | 1580 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); |
@@ -1582,7 +1583,7 @@ static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | |||
1582 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, | 1583 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, |
1583 | const char *buf, size_t count) | 1584 | const char *buf, size_t count) |
1584 | { | 1585 | { |
1585 | struct netiucv_priv *priv = dev->driver_data; | 1586 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1586 | 1587 | ||
1587 | IUCV_DBF_TEXT(trace, 5, __func__); | 1588 | IUCV_DBF_TEXT(trace, 5, __func__); |
1588 | priv->conn->prof.doios_multi = 0; | 1589 | priv->conn->prof.doios_multi = 0; |
@@ -1594,7 +1595,7 @@ static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write); | |||
1594 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | 1595 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, |
1595 | char *buf) | 1596 | char *buf) |
1596 | { | 1597 | { |
1597 | struct netiucv_priv *priv = dev->driver_data; | 1598 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1598 | 1599 | ||
1599 | IUCV_DBF_TEXT(trace, 5, __func__); | 1600 | IUCV_DBF_TEXT(trace, 5, __func__); |
1600 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); | 1601 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); |
@@ -1603,7 +1604,7 @@ static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | |||
1603 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, | 1604 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, |
1604 | const char *buf, size_t count) | 1605 | const char *buf, size_t count) |
1605 | { | 1606 | { |
1606 | struct netiucv_priv *priv = dev->driver_data; | 1607 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1607 | 1608 | ||
1608 | IUCV_DBF_TEXT(trace, 4, __func__); | 1609 | IUCV_DBF_TEXT(trace, 4, __func__); |
1609 | priv->conn->prof.txlen = 0; | 1610 | priv->conn->prof.txlen = 0; |
@@ -1615,7 +1616,7 @@ static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write); | |||
1615 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | 1616 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, |
1616 | char *buf) | 1617 | char *buf) |
1617 | { | 1618 | { |
1618 | struct netiucv_priv *priv = dev->driver_data; | 1619 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1619 | 1620 | ||
1620 | IUCV_DBF_TEXT(trace, 5, __func__); | 1621 | IUCV_DBF_TEXT(trace, 5, __func__); |
1621 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); | 1622 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); |
@@ -1624,7 +1625,7 @@ static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | |||
1624 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, | 1625 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, |
1625 | const char *buf, size_t count) | 1626 | const char *buf, size_t count) |
1626 | { | 1627 | { |
1627 | struct netiucv_priv *priv = dev->driver_data; | 1628 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1628 | 1629 | ||
1629 | IUCV_DBF_TEXT(trace, 4, __func__); | 1630 | IUCV_DBF_TEXT(trace, 4, __func__); |
1630 | priv->conn->prof.tx_time = 0; | 1631 | priv->conn->prof.tx_time = 0; |
@@ -1636,7 +1637,7 @@ static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write); | |||
1636 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | 1637 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, |
1637 | char *buf) | 1638 | char *buf) |
1638 | { | 1639 | { |
1639 | struct netiucv_priv *priv = dev->driver_data; | 1640 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1640 | 1641 | ||
1641 | IUCV_DBF_TEXT(trace, 5, __func__); | 1642 | IUCV_DBF_TEXT(trace, 5, __func__); |
1642 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); | 1643 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); |
@@ -1645,7 +1646,7 @@ static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | |||
1645 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, | 1646 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, |
1646 | const char *buf, size_t count) | 1647 | const char *buf, size_t count) |
1647 | { | 1648 | { |
1648 | struct netiucv_priv *priv = dev->driver_data; | 1649 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1649 | 1650 | ||
1650 | IUCV_DBF_TEXT(trace, 4, __func__); | 1651 | IUCV_DBF_TEXT(trace, 4, __func__); |
1651 | priv->conn->prof.tx_pending = 0; | 1652 | priv->conn->prof.tx_pending = 0; |
@@ -1657,7 +1658,7 @@ static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write); | |||
1657 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | 1658 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, |
1658 | char *buf) | 1659 | char *buf) |
1659 | { | 1660 | { |
1660 | struct netiucv_priv *priv = dev->driver_data; | 1661 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1661 | 1662 | ||
1662 | IUCV_DBF_TEXT(trace, 5, __func__); | 1663 | IUCV_DBF_TEXT(trace, 5, __func__); |
1663 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); | 1664 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); |
@@ -1666,7 +1667,7 @@ static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | |||
1666 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, | 1667 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, |
1667 | const char *buf, size_t count) | 1668 | const char *buf, size_t count) |
1668 | { | 1669 | { |
1669 | struct netiucv_priv *priv = dev->driver_data; | 1670 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1670 | 1671 | ||
1671 | IUCV_DBF_TEXT(trace, 4, __func__); | 1672 | IUCV_DBF_TEXT(trace, 4, __func__); |
1672 | priv->conn->prof.tx_max_pending = 0; | 1673 | priv->conn->prof.tx_max_pending = 0; |
@@ -1758,7 +1759,7 @@ static int netiucv_register_device(struct net_device *ndev) | |||
1758 | if (ret) | 1759 | if (ret) |
1759 | goto out_unreg; | 1760 | goto out_unreg; |
1760 | priv->dev = dev; | 1761 | priv->dev = dev; |
1761 | dev->driver_data = priv; | 1762 | dev_set_drvdata(dev, priv); |
1762 | return 0; | 1763 | return 0; |
1763 | 1764 | ||
1764 | out_unreg: | 1765 | out_unreg: |