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 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); |