diff options
Diffstat (limited to 'drivers/s390/char')
-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 |
7 files changed, 43 insertions, 43 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index b79f31add39c..04dc734805c6 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -364,7 +364,7 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm, | |||
364 | int cstat, dstat; | 364 | int cstat, dstat; |
365 | int count; | 365 | int count; |
366 | 366 | ||
367 | raw = cdev->dev.driver_data; | 367 | raw = dev_get_drvdata(&cdev->dev); |
368 | req = (struct raw3215_req *) intparm; | 368 | req = (struct raw3215_req *) intparm; |
369 | cstat = irb->scsw.cmd.cstat; | 369 | cstat = irb->scsw.cmd.cstat; |
370 | dstat = irb->scsw.cmd.dstat; | 370 | dstat = irb->scsw.cmd.dstat; |
@@ -652,7 +652,7 @@ static int raw3215_probe (struct ccw_device *cdev) | |||
652 | int line; | 652 | int line; |
653 | 653 | ||
654 | /* Console is special. */ | 654 | /* Console is special. */ |
655 | if (raw3215[0] && (cdev->dev.driver_data == raw3215[0])) | 655 | if (raw3215[0] && (raw3215[0] == dev_get_drvdata(&cdev->dev))) |
656 | return 0; | 656 | return 0; |
657 | raw = kmalloc(sizeof(struct raw3215_info) + | 657 | raw = kmalloc(sizeof(struct raw3215_info) + |
658 | RAW3215_INBUF_SIZE, GFP_KERNEL|GFP_DMA); | 658 | RAW3215_INBUF_SIZE, GFP_KERNEL|GFP_DMA); |
@@ -686,7 +686,7 @@ static int raw3215_probe (struct ccw_device *cdev) | |||
686 | } | 686 | } |
687 | init_waitqueue_head(&raw->empty_wait); | 687 | init_waitqueue_head(&raw->empty_wait); |
688 | 688 | ||
689 | cdev->dev.driver_data = raw; | 689 | dev_set_drvdata(&cdev->dev, raw); |
690 | cdev->handler = raw3215_irq; | 690 | cdev->handler = raw3215_irq; |
691 | 691 | ||
692 | return 0; | 692 | return 0; |
@@ -697,9 +697,9 @@ static void raw3215_remove (struct ccw_device *cdev) | |||
697 | struct raw3215_info *raw; | 697 | struct raw3215_info *raw; |
698 | 698 | ||
699 | ccw_device_set_offline(cdev); | 699 | ccw_device_set_offline(cdev); |
700 | raw = cdev->dev.driver_data; | 700 | raw = dev_get_drvdata(&cdev->dev); |
701 | if (raw) { | 701 | if (raw) { |
702 | cdev->dev.driver_data = NULL; | 702 | dev_set_drvdata(&cdev->dev, NULL); |
703 | kfree(raw->buffer); | 703 | kfree(raw->buffer); |
704 | kfree(raw); | 704 | kfree(raw); |
705 | } | 705 | } |
@@ -709,7 +709,7 @@ static int raw3215_set_online (struct ccw_device *cdev) | |||
709 | { | 709 | { |
710 | struct raw3215_info *raw; | 710 | struct raw3215_info *raw; |
711 | 711 | ||
712 | raw = cdev->dev.driver_data; | 712 | raw = dev_get_drvdata(&cdev->dev); |
713 | if (!raw) | 713 | if (!raw) |
714 | return -ENODEV; | 714 | return -ENODEV; |
715 | 715 | ||
@@ -720,7 +720,7 @@ static int raw3215_set_offline (struct ccw_device *cdev) | |||
720 | { | 720 | { |
721 | struct raw3215_info *raw; | 721 | struct raw3215_info *raw; |
722 | 722 | ||
723 | raw = cdev->dev.driver_data; | 723 | raw = dev_get_drvdata(&cdev->dev); |
724 | if (!raw) | 724 | if (!raw) |
725 | return -ENODEV; | 725 | return -ENODEV; |
726 | 726 | ||
@@ -898,7 +898,7 @@ static int __init con3215_init(void) | |||
898 | raw->buffer = (char *) alloc_bootmem_low(RAW3215_BUFFER_SIZE); | 898 | raw->buffer = (char *) alloc_bootmem_low(RAW3215_BUFFER_SIZE); |
899 | raw->inbuf = (char *) alloc_bootmem_low(RAW3215_INBUF_SIZE); | 899 | raw->inbuf = (char *) alloc_bootmem_low(RAW3215_INBUF_SIZE); |
900 | raw->cdev = cdev; | 900 | raw->cdev = cdev; |
901 | cdev->dev.driver_data = raw; | 901 | dev_set_drvdata(&cdev->dev, raw); |
902 | cdev->handler = raw3215_irq; | 902 | cdev->handler = raw3215_irq; |
903 | 903 | ||
904 | raw->flags |= RAW3215_FIXED; | 904 | raw->flags |= RAW3215_FIXED; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 81c151b5f0ac..acab7b2dfe8a 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -357,7 +357,7 @@ raw3270_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
357 | struct raw3270_request *rq; | 357 | struct raw3270_request *rq; |
358 | int rc; | 358 | int rc; |
359 | 359 | ||
360 | rp = (struct raw3270 *) cdev->dev.driver_data; | 360 | rp = dev_get_drvdata(&cdev->dev); |
361 | if (!rp) | 361 | if (!rp) |
362 | return; | 362 | return; |
363 | rq = (struct raw3270_request *) intparm; | 363 | rq = (struct raw3270_request *) intparm; |
@@ -831,7 +831,7 @@ raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp, char *ascebc) | |||
831 | if (rp->minor == -1) | 831 | if (rp->minor == -1) |
832 | return -EUSERS; | 832 | return -EUSERS; |
833 | rp->cdev = cdev; | 833 | rp->cdev = cdev; |
834 | cdev->dev.driver_data = rp; | 834 | dev_set_drvdata(&cdev->dev, rp); |
835 | cdev->handler = raw3270_irq; | 835 | cdev->handler = raw3270_irq; |
836 | return 0; | 836 | return 0; |
837 | } | 837 | } |
@@ -1112,7 +1112,7 @@ raw3270_delete_device(struct raw3270 *rp) | |||
1112 | /* Disconnect from ccw_device. */ | 1112 | /* Disconnect from ccw_device. */ |
1113 | cdev = rp->cdev; | 1113 | cdev = rp->cdev; |
1114 | rp->cdev = NULL; | 1114 | rp->cdev = NULL; |
1115 | cdev->dev.driver_data = NULL; | 1115 | dev_set_drvdata(&cdev->dev, NULL); |
1116 | cdev->handler = NULL; | 1116 | cdev->handler = NULL; |
1117 | 1117 | ||
1118 | /* Put ccw_device structure. */ | 1118 | /* Put ccw_device structure. */ |
@@ -1136,7 +1136,7 @@ static ssize_t | |||
1136 | raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) | 1136 | raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) |
1137 | { | 1137 | { |
1138 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1138 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1139 | ((struct raw3270 *) dev->driver_data)->model); | 1139 | ((struct raw3270 *) dev_get_drvdata(dev))->model); |
1140 | } | 1140 | } |
1141 | static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); | 1141 | static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); |
1142 | 1142 | ||
@@ -1144,7 +1144,7 @@ static ssize_t | |||
1144 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) | 1144 | raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) |
1145 | { | 1145 | { |
1146 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1146 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1147 | ((struct raw3270 *) dev->driver_data)->rows); | 1147 | ((struct raw3270 *) dev_get_drvdata(dev))->rows); |
1148 | } | 1148 | } |
1149 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); | 1149 | static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); |
1150 | 1150 | ||
@@ -1152,7 +1152,7 @@ static ssize_t | |||
1152 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) | 1152 | raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) |
1153 | { | 1153 | { |
1154 | return snprintf(buf, PAGE_SIZE, "%i\n", | 1154 | return snprintf(buf, PAGE_SIZE, "%i\n", |
1155 | ((struct raw3270 *) dev->driver_data)->cols); | 1155 | ((struct raw3270 *) dev_get_drvdata(dev))->cols); |
1156 | } | 1156 | } |
1157 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); | 1157 | static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); |
1158 | 1158 | ||
@@ -1289,7 +1289,7 @@ raw3270_remove (struct ccw_device *cdev) | |||
1289 | struct raw3270_view *v; | 1289 | struct raw3270_view *v; |
1290 | struct raw3270_notifier *np; | 1290 | struct raw3270_notifier *np; |
1291 | 1291 | ||
1292 | rp = cdev->dev.driver_data; | 1292 | rp = dev_get_drvdata(&cdev->dev); |
1293 | /* | 1293 | /* |
1294 | * _remove is the opposite of _probe; it's probe that | 1294 | * _remove is the opposite of _probe; it's probe that |
1295 | * should set up rp. raw3270_remove gets entered for | 1295 | * should set up rp. raw3270_remove gets entered for |
@@ -1337,7 +1337,7 @@ raw3270_set_offline (struct ccw_device *cdev) | |||
1337 | { | 1337 | { |
1338 | struct raw3270 *rp; | 1338 | struct raw3270 *rp; |
1339 | 1339 | ||
1340 | rp = cdev->dev.driver_data; | 1340 | rp = dev_get_drvdata(&cdev->dev); |
1341 | if (test_bit(RAW3270_FLAGS_CONSOLE, &rp->flags)) | 1341 | if (test_bit(RAW3270_FLAGS_CONSOLE, &rp->flags)) |
1342 | return -EBUSY; | 1342 | return -EBUSY; |
1343 | raw3270_remove(cdev); | 1343 | raw3270_remove(cdev); |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 144d2a5e1a92..5a519fac37b7 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 23e6598bc4b5..418f72dd39b4 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 3ebaa8eb5c86..595aa04cfd01 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 | } |
@@ -440,7 +440,7 @@ tape_generic_offline(struct ccw_device *cdev) | |||
440 | { | 440 | { |
441 | struct tape_device *device; | 441 | struct tape_device *device; |
442 | 442 | ||
443 | device = cdev->dev.driver_data; | 443 | device = dev_get_drvdata(&cdev->dev); |
444 | if (!device) { | 444 | if (!device) { |
445 | return -ENODEV; | 445 | return -ENODEV; |
446 | } | 446 | } |
@@ -583,7 +583,7 @@ tape_generic_probe(struct ccw_device *cdev) | |||
583 | tape_put_device(device); | 583 | tape_put_device(device); |
584 | return ret; | 584 | return ret; |
585 | } | 585 | } |
586 | cdev->dev.driver_data = device; | 586 | dev_set_drvdata(&cdev->dev, device); |
587 | cdev->handler = __tape_do_irq; | 587 | cdev->handler = __tape_do_irq; |
588 | device->cdev = cdev; | 588 | device->cdev = cdev; |
589 | ccw_device_get_id(cdev, &dev_id); | 589 | ccw_device_get_id(cdev, &dev_id); |
@@ -622,7 +622,7 @@ tape_generic_remove(struct ccw_device *cdev) | |||
622 | { | 622 | { |
623 | struct tape_device * device; | 623 | struct tape_device * device; |
624 | 624 | ||
625 | device = cdev->dev.driver_data; | 625 | device = dev_get_drvdata(&cdev->dev); |
626 | if (!device) { | 626 | if (!device) { |
627 | return; | 627 | return; |
628 | } | 628 | } |
@@ -662,9 +662,9 @@ tape_generic_remove(struct ccw_device *cdev) | |||
662 | tape_cleanup_device(device); | 662 | tape_cleanup_device(device); |
663 | } | 663 | } |
664 | 664 | ||
665 | if (cdev->dev.driver_data != NULL) { | 665 | if (!dev_get_drvdata(&cdev->dev)) { |
666 | sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); | 666 | sysfs_remove_group(&cdev->dev.kobj, &tape_attr_group); |
667 | cdev->dev.driver_data = tape_put_device(cdev->dev.driver_data); | 667 | dev_set_drvdata(&cdev->dev, tape_put_device(dev_get_drvdata(&cdev->dev))); |
668 | } | 668 | } |
669 | } | 669 | } |
670 | 670 | ||
@@ -1060,7 +1060,7 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1060 | struct tape_request *request; | 1060 | struct tape_request *request; |
1061 | int rc; | 1061 | int rc; |
1062 | 1062 | ||
1063 | device = (struct tape_device *) cdev->dev.driver_data; | 1063 | device = dev_get_drvdata(&cdev->dev); |
1064 | if (device == NULL) { | 1064 | if (device == NULL) { |
1065 | return; | 1065 | return; |
1066 | } | 1066 | } |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index e925808c2149..411cfa3c7719 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 92458219a9e9..7d9e67cb6471 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -80,11 +80,11 @@ static DEFINE_MUTEX(vmur_mutex); | |||
80 | * | 80 | * |
81 | * Each ur device (urd) contains a reference to its corresponding ccw device | 81 | * Each ur device (urd) contains a reference to its corresponding ccw device |
82 | * (cdev) using the urd->cdev pointer. Each ccw device has a reference to the | 82 | * (cdev) using the urd->cdev pointer. Each ccw device has a reference to the |
83 | * ur device using the cdev->dev.driver_data pointer. | 83 | * ur device using dev_get_drvdata(&cdev->dev) pointer. |
84 | * | 84 | * |
85 | * urd references: | 85 | * urd references: |
86 | * - ur_probe gets a urd reference, ur_remove drops the reference | 86 | * - ur_probe gets a urd reference, ur_remove drops the reference |
87 | * (cdev->dev.driver_data) | 87 | * dev_get_drvdata(&cdev->dev) |
88 | * - ur_open gets a urd reference, ur_relase drops the reference | 88 | * - ur_open gets a urd reference, ur_relase drops the reference |
89 | * (urf->urd) | 89 | * (urf->urd) |
90 | * | 90 | * |
@@ -92,7 +92,7 @@ static DEFINE_MUTEX(vmur_mutex); | |||
92 | * - urdev_alloc get a cdev reference (urd->cdev) | 92 | * - urdev_alloc get a cdev reference (urd->cdev) |
93 | * - urdev_free drops the cdev reference (urd->cdev) | 93 | * - urdev_free drops the cdev reference (urd->cdev) |
94 | * | 94 | * |
95 | * Setting and clearing of cdev->dev.driver_data is protected by the ccwdev lock | 95 | * Setting and clearing of dev_get_drvdata(&cdev->dev) is protected by the ccwdev lock |
96 | */ | 96 | */ |
97 | static struct urdev *urdev_alloc(struct ccw_device *cdev) | 97 | static struct urdev *urdev_alloc(struct ccw_device *cdev) |
98 | { | 98 | { |
@@ -131,7 +131,7 @@ static struct urdev *urdev_get_from_cdev(struct ccw_device *cdev) | |||
131 | unsigned long flags; | 131 | unsigned long flags; |
132 | 132 | ||
133 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); | 133 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); |
134 | urd = cdev->dev.driver_data; | 134 | urd = dev_get_drvdata(&cdev->dev); |
135 | if (urd) | 135 | if (urd) |
136 | urdev_get(urd); | 136 | urdev_get(urd); |
137 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); | 137 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); |
@@ -310,7 +310,7 @@ static void ur_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
310 | TRACE("ur_int_handler: unsolicited interrupt\n"); | 310 | TRACE("ur_int_handler: unsolicited interrupt\n"); |
311 | return; | 311 | return; |
312 | } | 312 | } |
313 | urd = cdev->dev.driver_data; | 313 | urd = dev_get_drvdata(&cdev->dev); |
314 | BUG_ON(!urd); | 314 | BUG_ON(!urd); |
315 | /* On special conditions irb is an error pointer */ | 315 | /* On special conditions irb is an error pointer */ |
316 | if (IS_ERR(irb)) | 316 | if (IS_ERR(irb)) |
@@ -856,7 +856,7 @@ static int ur_probe(struct ccw_device *cdev) | |||
856 | goto fail_remove_attr; | 856 | goto fail_remove_attr; |
857 | } | 857 | } |
858 | spin_lock_irq(get_ccwdev_lock(cdev)); | 858 | spin_lock_irq(get_ccwdev_lock(cdev)); |
859 | cdev->dev.driver_data = urd; | 859 | dev_set_drvdata(&cdev->dev, urd); |
860 | spin_unlock_irq(get_ccwdev_lock(cdev)); | 860 | spin_unlock_irq(get_ccwdev_lock(cdev)); |
861 | 861 | ||
862 | mutex_unlock(&vmur_mutex); | 862 | mutex_unlock(&vmur_mutex); |
@@ -996,8 +996,8 @@ static void ur_remove(struct ccw_device *cdev) | |||
996 | ur_remove_attributes(&cdev->dev); | 996 | ur_remove_attributes(&cdev->dev); |
997 | 997 | ||
998 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); | 998 | spin_lock_irqsave(get_ccwdev_lock(cdev), flags); |
999 | urdev_put(cdev->dev.driver_data); | 999 | urdev_put(dev_get_drvdata(&cdev->dev)); |
1000 | cdev->dev.driver_data = NULL; | 1000 | dev_set_drvdata(&cdev->dev, NULL); |
1001 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); | 1001 | spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); |
1002 | 1002 | ||
1003 | mutex_unlock(&vmur_mutex); | 1003 | mutex_unlock(&vmur_mutex); |