diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:57:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:57:37 -0400 |
commit | 6fd03301d76bc439382710e449f58efbb233df1b (patch) | |
tree | 3c8a3217aed67319683ffc1debccdb5b3245b16c /drivers/s390 | |
parent | cd5232bd6be2d215a800f3d88c287ca791debfbe (diff) | |
parent | e4792aa30f9d33584d7192685ed149cc5fee737f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (64 commits)
debugfs: use specified mode to possibly mark files read/write only
debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem.
xen: remove driver_data direct access of struct device from more drivers
usb: gadget: at91_udc: remove driver_data direct access of struct device
uml: remove driver_data direct access of struct device
block/ps3: remove driver_data direct access of struct device
s390: remove driver_data direct access of struct device
parport: remove driver_data direct access of struct device
parisc: remove driver_data direct access of struct device
of_serial: remove driver_data direct access of struct device
mips: remove driver_data direct access of struct device
ipmi: remove driver_data direct access of struct device
infiniband: ehca: remove driver_data direct access of struct device
ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device
hvcs: remove driver_data direct access of struct device
xen block: remove driver_data direct access of struct device
thermal: remove driver_data direct access of struct device
scsi: remove driver_data direct access of struct device
pcmcia: remove driver_data direct access of struct device
PCIE: remove driver_data direct access of struct device
...
Manually fix up trivial conflicts due to different direct driver_data
direct access fixups in drivers/block/{ps3disk.c,ps3vram.c}
Diffstat (limited to 'drivers/s390')
-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 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); |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index d40f7a934f94..f370f8d460a7 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -290,7 +290,7 @@ claw_probe(struct ccwgroup_device *cgdev) | |||
290 | if (!get_device(&cgdev->dev)) | 290 | if (!get_device(&cgdev->dev)) |
291 | return -ENODEV; | 291 | return -ENODEV; |
292 | privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL); | 292 | privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL); |
293 | cgdev->dev.driver_data = privptr; | 293 | dev_set_drvdata(&cgdev->dev, privptr); |
294 | if (privptr == NULL) { | 294 | if (privptr == NULL) { |
295 | probe_error(cgdev); | 295 | probe_error(cgdev); |
296 | put_device(&cgdev->dev); | 296 | put_device(&cgdev->dev); |
@@ -597,14 +597,14 @@ claw_irq_handler(struct ccw_device *cdev, | |||
597 | 597 | ||
598 | CLAW_DBF_TEXT(4, trace, "clawirq"); | 598 | CLAW_DBF_TEXT(4, trace, "clawirq"); |
599 | /* Bypass all 'unsolicited interrupts' */ | 599 | /* Bypass all 'unsolicited interrupts' */ |
600 | if (!cdev->dev.driver_data) { | 600 | privptr = dev_get_drvdata(&cdev->dev); |
601 | if (!privptr) { | ||
601 | dev_warn(&cdev->dev, "An uninitialized CLAW device received an" | 602 | dev_warn(&cdev->dev, "An uninitialized CLAW device received an" |
602 | " IRQ, c-%02x d-%02x\n", | 603 | " IRQ, c-%02x d-%02x\n", |
603 | irb->scsw.cmd.cstat, irb->scsw.cmd.dstat); | 604 | irb->scsw.cmd.cstat, irb->scsw.cmd.dstat); |
604 | CLAW_DBF_TEXT(2, trace, "badirq"); | 605 | CLAW_DBF_TEXT(2, trace, "badirq"); |
605 | return; | 606 | return; |
606 | } | 607 | } |
607 | privptr = (struct claw_privbk *)cdev->dev.driver_data; | ||
608 | 608 | ||
609 | /* Try to extract channel from driver data. */ | 609 | /* Try to extract channel from driver data. */ |
610 | if (privptr->channel[READ].cdev == cdev) | 610 | if (privptr->channel[READ].cdev == cdev) |
@@ -1986,9 +1986,9 @@ probe_error( struct ccwgroup_device *cgdev) | |||
1986 | struct claw_privbk *privptr; | 1986 | struct claw_privbk *privptr; |
1987 | 1987 | ||
1988 | CLAW_DBF_TEXT(4, trace, "proberr"); | 1988 | CLAW_DBF_TEXT(4, trace, "proberr"); |
1989 | privptr = (struct claw_privbk *) cgdev->dev.driver_data; | 1989 | privptr = dev_get_drvdata(&cgdev->dev); |
1990 | if (privptr != NULL) { | 1990 | if (privptr != NULL) { |
1991 | cgdev->dev.driver_data = NULL; | 1991 | dev_set_drvdata(&cgdev->dev, NULL); |
1992 | kfree(privptr->p_env); | 1992 | kfree(privptr->p_env); |
1993 | kfree(privptr->p_mtc_envelope); | 1993 | kfree(privptr->p_mtc_envelope); |
1994 | kfree(privptr); | 1994 | kfree(privptr); |
@@ -2917,9 +2917,9 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2917 | dev_info(&cgdev->dev, "add for %s\n", | 2917 | dev_info(&cgdev->dev, "add for %s\n", |
2918 | dev_name(&cgdev->cdev[READ]->dev)); | 2918 | dev_name(&cgdev->cdev[READ]->dev)); |
2919 | CLAW_DBF_TEXT(2, setup, "new_dev"); | 2919 | CLAW_DBF_TEXT(2, setup, "new_dev"); |
2920 | privptr = cgdev->dev.driver_data; | 2920 | privptr = dev_get_drvdata(&cgdev->dev); |
2921 | cgdev->cdev[READ]->dev.driver_data = privptr; | 2921 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); |
2922 | cgdev->cdev[WRITE]->dev.driver_data = privptr; | 2922 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); |
2923 | if (!privptr) | 2923 | if (!privptr) |
2924 | return -ENODEV; | 2924 | return -ENODEV; |
2925 | p_env = privptr->p_env; | 2925 | p_env = privptr->p_env; |
@@ -2956,9 +2956,9 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
2956 | goto out; | 2956 | goto out; |
2957 | } | 2957 | } |
2958 | dev->ml_priv = privptr; | 2958 | dev->ml_priv = privptr; |
2959 | cgdev->dev.driver_data = privptr; | 2959 | dev_set_drvdata(&cgdev->dev, privptr); |
2960 | cgdev->cdev[READ]->dev.driver_data = privptr; | 2960 | dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr); |
2961 | cgdev->cdev[WRITE]->dev.driver_data = privptr; | 2961 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr); |
2962 | /* sysfs magic */ | 2962 | /* sysfs magic */ |
2963 | SET_NETDEV_DEV(dev, &cgdev->dev); | 2963 | SET_NETDEV_DEV(dev, &cgdev->dev); |
2964 | if (register_netdev(dev) != 0) { | 2964 | if (register_netdev(dev) != 0) { |
@@ -3024,7 +3024,7 @@ claw_shutdown_device(struct ccwgroup_device *cgdev) | |||
3024 | int ret; | 3024 | int ret; |
3025 | 3025 | ||
3026 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); | 3026 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); |
3027 | priv = cgdev->dev.driver_data; | 3027 | priv = dev_get_drvdata(&cgdev->dev); |
3028 | if (!priv) | 3028 | if (!priv) |
3029 | return -ENODEV; | 3029 | return -ENODEV; |
3030 | ndev = priv->channel[READ].ndev; | 3030 | ndev = priv->channel[READ].ndev; |
@@ -3054,7 +3054,7 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
3054 | 3054 | ||
3055 | BUG_ON(!cgdev); | 3055 | BUG_ON(!cgdev); |
3056 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); | 3056 | CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); |
3057 | priv = cgdev->dev.driver_data; | 3057 | priv = dev_get_drvdata(&cgdev->dev); |
3058 | BUG_ON(!priv); | 3058 | BUG_ON(!priv); |
3059 | dev_info(&cgdev->dev, " will be removed.\n"); | 3059 | dev_info(&cgdev->dev, " will be removed.\n"); |
3060 | if (cgdev->state == CCWGROUP_ONLINE) | 3060 | if (cgdev->state == CCWGROUP_ONLINE) |
@@ -3069,9 +3069,9 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
3069 | kfree(priv->channel[1].irb); | 3069 | kfree(priv->channel[1].irb); |
3070 | priv->channel[1].irb=NULL; | 3070 | priv->channel[1].irb=NULL; |
3071 | kfree(priv); | 3071 | kfree(priv); |
3072 | cgdev->dev.driver_data=NULL; | 3072 | dev_set_drvdata(&cgdev->dev, NULL); |
3073 | cgdev->cdev[READ]->dev.driver_data = NULL; | 3073 | dev_set_drvdata(&cgdev->cdev[READ]->dev, NULL); |
3074 | cgdev->cdev[WRITE]->dev.driver_data = NULL; | 3074 | dev_set_drvdata(&cgdev->cdev[WRITE]->dev, NULL); |
3075 | put_device(&cgdev->dev); | 3075 | put_device(&cgdev->dev); |
3076 | 3076 | ||
3077 | return; | 3077 | return; |
@@ -3087,7 +3087,7 @@ claw_hname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3087 | struct claw_privbk *priv; | 3087 | struct claw_privbk *priv; |
3088 | struct claw_env * p_env; | 3088 | struct claw_env * p_env; |
3089 | 3089 | ||
3090 | priv = dev->driver_data; | 3090 | priv = dev_get_drvdata(dev); |
3091 | if (!priv) | 3091 | if (!priv) |
3092 | return -ENODEV; | 3092 | return -ENODEV; |
3093 | p_env = priv->p_env; | 3093 | p_env = priv->p_env; |
@@ -3101,7 +3101,7 @@ claw_hname_write(struct device *dev, struct device_attribute *attr, | |||
3101 | struct claw_privbk *priv; | 3101 | struct claw_privbk *priv; |
3102 | struct claw_env * p_env; | 3102 | struct claw_env * p_env; |
3103 | 3103 | ||
3104 | priv = dev->driver_data; | 3104 | priv = dev_get_drvdata(dev); |
3105 | if (!priv) | 3105 | if (!priv) |
3106 | return -ENODEV; | 3106 | return -ENODEV; |
3107 | p_env = priv->p_env; | 3107 | p_env = priv->p_env; |
@@ -3125,7 +3125,7 @@ claw_adname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3125 | struct claw_privbk *priv; | 3125 | struct claw_privbk *priv; |
3126 | struct claw_env * p_env; | 3126 | struct claw_env * p_env; |
3127 | 3127 | ||
3128 | priv = dev->driver_data; | 3128 | priv = dev_get_drvdata(dev); |
3129 | if (!priv) | 3129 | if (!priv) |
3130 | return -ENODEV; | 3130 | return -ENODEV; |
3131 | p_env = priv->p_env; | 3131 | p_env = priv->p_env; |
@@ -3139,7 +3139,7 @@ claw_adname_write(struct device *dev, struct device_attribute *attr, | |||
3139 | struct claw_privbk *priv; | 3139 | struct claw_privbk *priv; |
3140 | struct claw_env * p_env; | 3140 | struct claw_env * p_env; |
3141 | 3141 | ||
3142 | priv = dev->driver_data; | 3142 | priv = dev_get_drvdata(dev); |
3143 | if (!priv) | 3143 | if (!priv) |
3144 | return -ENODEV; | 3144 | return -ENODEV; |
3145 | p_env = priv->p_env; | 3145 | p_env = priv->p_env; |
@@ -3163,7 +3163,7 @@ claw_apname_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3163 | struct claw_privbk *priv; | 3163 | struct claw_privbk *priv; |
3164 | struct claw_env * p_env; | 3164 | struct claw_env * p_env; |
3165 | 3165 | ||
3166 | priv = dev->driver_data; | 3166 | priv = dev_get_drvdata(dev); |
3167 | if (!priv) | 3167 | if (!priv) |
3168 | return -ENODEV; | 3168 | return -ENODEV; |
3169 | p_env = priv->p_env; | 3169 | p_env = priv->p_env; |
@@ -3178,7 +3178,7 @@ claw_apname_write(struct device *dev, struct device_attribute *attr, | |||
3178 | struct claw_privbk *priv; | 3178 | struct claw_privbk *priv; |
3179 | struct claw_env * p_env; | 3179 | struct claw_env * p_env; |
3180 | 3180 | ||
3181 | priv = dev->driver_data; | 3181 | priv = dev_get_drvdata(dev); |
3182 | if (!priv) | 3182 | if (!priv) |
3183 | return -ENODEV; | 3183 | return -ENODEV; |
3184 | p_env = priv->p_env; | 3184 | p_env = priv->p_env; |
@@ -3212,7 +3212,7 @@ claw_wbuff_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3212 | struct claw_privbk *priv; | 3212 | struct claw_privbk *priv; |
3213 | struct claw_env * p_env; | 3213 | struct claw_env * p_env; |
3214 | 3214 | ||
3215 | priv = dev->driver_data; | 3215 | priv = dev_get_drvdata(dev); |
3216 | if (!priv) | 3216 | if (!priv) |
3217 | return -ENODEV; | 3217 | return -ENODEV; |
3218 | p_env = priv->p_env; | 3218 | p_env = priv->p_env; |
@@ -3227,7 +3227,7 @@ claw_wbuff_write(struct device *dev, struct device_attribute *attr, | |||
3227 | struct claw_env * p_env; | 3227 | struct claw_env * p_env; |
3228 | int nnn,max; | 3228 | int nnn,max; |
3229 | 3229 | ||
3230 | priv = dev->driver_data; | 3230 | priv = dev_get_drvdata(dev); |
3231 | if (!priv) | 3231 | if (!priv) |
3232 | return -ENODEV; | 3232 | return -ENODEV; |
3233 | p_env = priv->p_env; | 3233 | p_env = priv->p_env; |
@@ -3254,7 +3254,7 @@ claw_rbuff_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
3254 | struct claw_privbk *priv; | 3254 | struct claw_privbk *priv; |
3255 | struct claw_env * p_env; | 3255 | struct claw_env * p_env; |
3256 | 3256 | ||
3257 | priv = dev->driver_data; | 3257 | priv = dev_get_drvdata(dev); |
3258 | if (!priv) | 3258 | if (!priv) |
3259 | return -ENODEV; | 3259 | return -ENODEV; |
3260 | p_env = priv->p_env; | 3260 | p_env = priv->p_env; |
@@ -3269,7 +3269,7 @@ claw_rbuff_write(struct device *dev, struct device_attribute *attr, | |||
3269 | struct claw_env *p_env; | 3269 | struct claw_env *p_env; |
3270 | int nnn,max; | 3270 | int nnn,max; |
3271 | 3271 | ||
3272 | priv = dev->driver_data; | 3272 | priv = dev_get_drvdata(dev); |
3273 | if (!priv) | 3273 | if (!priv) |
3274 | return -ENODEV; | 3274 | return -ENODEV; |
3275 | p_env = priv->p_env; | 3275 | p_env = priv->p_env; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 07a25c3f94b6..8c675905448b 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1936,7 +1936,7 @@ lcs_portno_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
1936 | { | 1936 | { |
1937 | struct lcs_card *card; | 1937 | struct lcs_card *card; |
1938 | 1938 | ||
1939 | card = (struct lcs_card *)dev->driver_data; | 1939 | card = dev_get_drvdata(dev); |
1940 | 1940 | ||
1941 | if (!card) | 1941 | if (!card) |
1942 | return 0; | 1942 | return 0; |
@@ -1953,7 +1953,7 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char | |||
1953 | struct lcs_card *card; | 1953 | struct lcs_card *card; |
1954 | int value; | 1954 | int value; |
1955 | 1955 | ||
1956 | card = (struct lcs_card *)dev->driver_data; | 1956 | card = dev_get_drvdata(dev); |
1957 | 1957 | ||
1958 | if (!card) | 1958 | if (!card) |
1959 | return 0; | 1959 | return 0; |
@@ -1987,7 +1987,7 @@ lcs_timeout_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
1987 | { | 1987 | { |
1988 | struct lcs_card *card; | 1988 | struct lcs_card *card; |
1989 | 1989 | ||
1990 | card = (struct lcs_card *)dev->driver_data; | 1990 | card = dev_get_drvdata(dev); |
1991 | 1991 | ||
1992 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; | 1992 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; |
1993 | } | 1993 | } |
@@ -1998,7 +1998,7 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char | |||
1998 | struct lcs_card *card; | 1998 | struct lcs_card *card; |
1999 | int value; | 1999 | int value; |
2000 | 2000 | ||
2001 | card = (struct lcs_card *)dev->driver_data; | 2001 | card = dev_get_drvdata(dev); |
2002 | 2002 | ||
2003 | if (!card) | 2003 | if (!card) |
2004 | return 0; | 2004 | return 0; |
@@ -2017,7 +2017,7 @@ static ssize_t | |||
2017 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, | 2017 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, |
2018 | const char *buf, size_t count) | 2018 | const char *buf, size_t count) |
2019 | { | 2019 | { |
2020 | struct lcs_card *card = dev->driver_data; | 2020 | struct lcs_card *card = dev_get_drvdata(dev); |
2021 | char *tmp; | 2021 | char *tmp; |
2022 | int i; | 2022 | int i; |
2023 | 2023 | ||
@@ -2070,7 +2070,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev) | |||
2070 | put_device(&ccwgdev->dev); | 2070 | put_device(&ccwgdev->dev); |
2071 | return ret; | 2071 | return ret; |
2072 | } | 2072 | } |
2073 | ccwgdev->dev.driver_data = card; | 2073 | dev_set_drvdata(&ccwgdev->dev, card); |
2074 | ccwgdev->cdev[0]->handler = lcs_irq; | 2074 | ccwgdev->cdev[0]->handler = lcs_irq; |
2075 | ccwgdev->cdev[1]->handler = lcs_irq; | 2075 | ccwgdev->cdev[1]->handler = lcs_irq; |
2076 | card->gdev = ccwgdev; | 2076 | card->gdev = ccwgdev; |
@@ -2087,7 +2087,7 @@ lcs_register_netdev(struct ccwgroup_device *ccwgdev) | |||
2087 | struct lcs_card *card; | 2087 | struct lcs_card *card; |
2088 | 2088 | ||
2089 | LCS_DBF_TEXT(2, setup, "regnetdv"); | 2089 | LCS_DBF_TEXT(2, setup, "regnetdv"); |
2090 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2090 | card = dev_get_drvdata(&ccwgdev->dev); |
2091 | if (card->dev->reg_state != NETREG_UNINITIALIZED) | 2091 | if (card->dev->reg_state != NETREG_UNINITIALIZED) |
2092 | return 0; | 2092 | return 0; |
2093 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); | 2093 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); |
@@ -2120,7 +2120,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev) | |||
2120 | enum lcs_dev_states recover_state; | 2120 | enum lcs_dev_states recover_state; |
2121 | int rc; | 2121 | int rc; |
2122 | 2122 | ||
2123 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2123 | card = dev_get_drvdata(&ccwgdev->dev); |
2124 | if (!card) | 2124 | if (!card) |
2125 | return -ENODEV; | 2125 | return -ENODEV; |
2126 | 2126 | ||
@@ -2226,7 +2226,7 @@ __lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode) | |||
2226 | int ret; | 2226 | int ret; |
2227 | 2227 | ||
2228 | LCS_DBF_TEXT(3, setup, "shtdndev"); | 2228 | LCS_DBF_TEXT(3, setup, "shtdndev"); |
2229 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2229 | card = dev_get_drvdata(&ccwgdev->dev); |
2230 | if (!card) | 2230 | if (!card) |
2231 | return -ENODEV; | 2231 | return -ENODEV; |
2232 | if (recovery_mode == 0) { | 2232 | if (recovery_mode == 0) { |
@@ -2293,7 +2293,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev) | |||
2293 | { | 2293 | { |
2294 | struct lcs_card *card; | 2294 | struct lcs_card *card; |
2295 | 2295 | ||
2296 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2296 | card = dev_get_drvdata(&ccwgdev->dev); |
2297 | if (!card) | 2297 | if (!card) |
2298 | return; | 2298 | return; |
2299 | 2299 | ||
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 fdb02d043d3e..52574ce797b2 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1452,7 +1452,7 @@ static int netiucv_change_mtu(struct net_device * dev, int new_mtu) | |||
1452 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, | 1452 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, |
1453 | char *buf) | 1453 | char *buf) |
1454 | { | 1454 | { |
1455 | struct netiucv_priv *priv = dev->driver_data; | 1455 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1456 | 1456 | ||
1457 | IUCV_DBF_TEXT(trace, 5, __func__); | 1457 | IUCV_DBF_TEXT(trace, 5, __func__); |
1458 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); | 1458 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); |
@@ -1461,7 +1461,7 @@ static ssize_t user_show(struct device *dev, struct device_attribute *attr, | |||
1461 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, | 1461 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, |
1462 | const char *buf, size_t count) | 1462 | const char *buf, size_t count) |
1463 | { | 1463 | { |
1464 | struct netiucv_priv *priv = dev->driver_data; | 1464 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1465 | struct net_device *ndev = priv->conn->netdev; | 1465 | struct net_device *ndev = priv->conn->netdev; |
1466 | char *p; | 1466 | char *p; |
1467 | char *tmp; | 1467 | char *tmp; |
@@ -1518,7 +1518,8 @@ static DEVICE_ATTR(user, 0644, user_show, user_write); | |||
1518 | 1518 | ||
1519 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | 1519 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, |
1520 | char *buf) | 1520 | char *buf) |
1521 | { struct netiucv_priv *priv = dev->driver_data; | 1521 | { |
1522 | struct netiucv_priv *priv = dev_get_drvdata(dev); | ||
1522 | 1523 | ||
1523 | IUCV_DBF_TEXT(trace, 5, __func__); | 1524 | IUCV_DBF_TEXT(trace, 5, __func__); |
1524 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); | 1525 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); |
@@ -1527,7 +1528,7 @@ static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | |||
1527 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, | 1528 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, |
1528 | const char *buf, size_t count) | 1529 | const char *buf, size_t count) |
1529 | { | 1530 | { |
1530 | struct netiucv_priv *priv = dev->driver_data; | 1531 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1531 | struct net_device *ndev = priv->conn->netdev; | 1532 | struct net_device *ndev = priv->conn->netdev; |
1532 | char *e; | 1533 | char *e; |
1533 | int bs1; | 1534 | int bs1; |
@@ -1575,7 +1576,7 @@ static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write); | |||
1575 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, | 1576 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, |
1576 | char *buf) | 1577 | char *buf) |
1577 | { | 1578 | { |
1578 | struct netiucv_priv *priv = dev->driver_data; | 1579 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1579 | 1580 | ||
1580 | IUCV_DBF_TEXT(trace, 5, __func__); | 1581 | IUCV_DBF_TEXT(trace, 5, __func__); |
1581 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); | 1582 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); |
@@ -1586,7 +1587,7 @@ static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL); | |||
1586 | static ssize_t conn_fsm_show (struct device *dev, | 1587 | static ssize_t conn_fsm_show (struct device *dev, |
1587 | struct device_attribute *attr, char *buf) | 1588 | struct device_attribute *attr, char *buf) |
1588 | { | 1589 | { |
1589 | struct netiucv_priv *priv = dev->driver_data; | 1590 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1590 | 1591 | ||
1591 | IUCV_DBF_TEXT(trace, 5, __func__); | 1592 | IUCV_DBF_TEXT(trace, 5, __func__); |
1592 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); | 1593 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); |
@@ -1597,7 +1598,7 @@ static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL); | |||
1597 | static ssize_t maxmulti_show (struct device *dev, | 1598 | static ssize_t maxmulti_show (struct device *dev, |
1598 | struct device_attribute *attr, char *buf) | 1599 | struct device_attribute *attr, char *buf) |
1599 | { | 1600 | { |
1600 | struct netiucv_priv *priv = dev->driver_data; | 1601 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1601 | 1602 | ||
1602 | IUCV_DBF_TEXT(trace, 5, __func__); | 1603 | IUCV_DBF_TEXT(trace, 5, __func__); |
1603 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); | 1604 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); |
@@ -1607,7 +1608,7 @@ static ssize_t maxmulti_write (struct device *dev, | |||
1607 | struct device_attribute *attr, | 1608 | struct device_attribute *attr, |
1608 | const char *buf, size_t count) | 1609 | const char *buf, size_t count) |
1609 | { | 1610 | { |
1610 | struct netiucv_priv *priv = dev->driver_data; | 1611 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1611 | 1612 | ||
1612 | IUCV_DBF_TEXT(trace, 4, __func__); | 1613 | IUCV_DBF_TEXT(trace, 4, __func__); |
1613 | priv->conn->prof.maxmulti = 0; | 1614 | priv->conn->prof.maxmulti = 0; |
@@ -1619,7 +1620,7 @@ static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write); | |||
1619 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | 1620 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, |
1620 | char *buf) | 1621 | char *buf) |
1621 | { | 1622 | { |
1622 | struct netiucv_priv *priv = dev->driver_data; | 1623 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1623 | 1624 | ||
1624 | IUCV_DBF_TEXT(trace, 5, __func__); | 1625 | IUCV_DBF_TEXT(trace, 5, __func__); |
1625 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); | 1626 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); |
@@ -1628,7 +1629,7 @@ static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | |||
1628 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, | 1629 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, |
1629 | const char *buf, size_t count) | 1630 | const char *buf, size_t count) |
1630 | { | 1631 | { |
1631 | struct netiucv_priv *priv = dev->driver_data; | 1632 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1632 | 1633 | ||
1633 | IUCV_DBF_TEXT(trace, 4, __func__); | 1634 | IUCV_DBF_TEXT(trace, 4, __func__); |
1634 | priv->conn->prof.maxcqueue = 0; | 1635 | priv->conn->prof.maxcqueue = 0; |
@@ -1640,7 +1641,7 @@ static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write); | |||
1640 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | 1641 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, |
1641 | char *buf) | 1642 | char *buf) |
1642 | { | 1643 | { |
1643 | struct netiucv_priv *priv = dev->driver_data; | 1644 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1644 | 1645 | ||
1645 | IUCV_DBF_TEXT(trace, 5, __func__); | 1646 | IUCV_DBF_TEXT(trace, 5, __func__); |
1646 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); | 1647 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); |
@@ -1649,7 +1650,7 @@ static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | |||
1649 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, | 1650 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, |
1650 | const char *buf, size_t count) | 1651 | const char *buf, size_t count) |
1651 | { | 1652 | { |
1652 | struct netiucv_priv *priv = dev->driver_data; | 1653 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1653 | 1654 | ||
1654 | IUCV_DBF_TEXT(trace, 4, __func__); | 1655 | IUCV_DBF_TEXT(trace, 4, __func__); |
1655 | priv->conn->prof.doios_single = 0; | 1656 | priv->conn->prof.doios_single = 0; |
@@ -1661,7 +1662,7 @@ static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write); | |||
1661 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | 1662 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, |
1662 | char *buf) | 1663 | char *buf) |
1663 | { | 1664 | { |
1664 | struct netiucv_priv *priv = dev->driver_data; | 1665 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1665 | 1666 | ||
1666 | IUCV_DBF_TEXT(trace, 5, __func__); | 1667 | IUCV_DBF_TEXT(trace, 5, __func__); |
1667 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); | 1668 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); |
@@ -1670,7 +1671,7 @@ static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | |||
1670 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, | 1671 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, |
1671 | const char *buf, size_t count) | 1672 | const char *buf, size_t count) |
1672 | { | 1673 | { |
1673 | struct netiucv_priv *priv = dev->driver_data; | 1674 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1674 | 1675 | ||
1675 | IUCV_DBF_TEXT(trace, 5, __func__); | 1676 | IUCV_DBF_TEXT(trace, 5, __func__); |
1676 | priv->conn->prof.doios_multi = 0; | 1677 | priv->conn->prof.doios_multi = 0; |
@@ -1682,7 +1683,7 @@ static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write); | |||
1682 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | 1683 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, |
1683 | char *buf) | 1684 | char *buf) |
1684 | { | 1685 | { |
1685 | struct netiucv_priv *priv = dev->driver_data; | 1686 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1686 | 1687 | ||
1687 | IUCV_DBF_TEXT(trace, 5, __func__); | 1688 | IUCV_DBF_TEXT(trace, 5, __func__); |
1688 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); | 1689 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); |
@@ -1691,7 +1692,7 @@ static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | |||
1691 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, | 1692 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, |
1692 | const char *buf, size_t count) | 1693 | const char *buf, size_t count) |
1693 | { | 1694 | { |
1694 | struct netiucv_priv *priv = dev->driver_data; | 1695 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1695 | 1696 | ||
1696 | IUCV_DBF_TEXT(trace, 4, __func__); | 1697 | IUCV_DBF_TEXT(trace, 4, __func__); |
1697 | priv->conn->prof.txlen = 0; | 1698 | priv->conn->prof.txlen = 0; |
@@ -1703,7 +1704,7 @@ static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write); | |||
1703 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | 1704 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, |
1704 | char *buf) | 1705 | char *buf) |
1705 | { | 1706 | { |
1706 | struct netiucv_priv *priv = dev->driver_data; | 1707 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1707 | 1708 | ||
1708 | IUCV_DBF_TEXT(trace, 5, __func__); | 1709 | IUCV_DBF_TEXT(trace, 5, __func__); |
1709 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); | 1710 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); |
@@ -1712,7 +1713,7 @@ static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | |||
1712 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, | 1713 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, |
1713 | const char *buf, size_t count) | 1714 | const char *buf, size_t count) |
1714 | { | 1715 | { |
1715 | struct netiucv_priv *priv = dev->driver_data; | 1716 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1716 | 1717 | ||
1717 | IUCV_DBF_TEXT(trace, 4, __func__); | 1718 | IUCV_DBF_TEXT(trace, 4, __func__); |
1718 | priv->conn->prof.tx_time = 0; | 1719 | priv->conn->prof.tx_time = 0; |
@@ -1724,7 +1725,7 @@ static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write); | |||
1724 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | 1725 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, |
1725 | char *buf) | 1726 | char *buf) |
1726 | { | 1727 | { |
1727 | struct netiucv_priv *priv = dev->driver_data; | 1728 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1728 | 1729 | ||
1729 | IUCV_DBF_TEXT(trace, 5, __func__); | 1730 | IUCV_DBF_TEXT(trace, 5, __func__); |
1730 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); | 1731 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); |
@@ -1733,7 +1734,7 @@ static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | |||
1733 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, | 1734 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, |
1734 | const char *buf, size_t count) | 1735 | const char *buf, size_t count) |
1735 | { | 1736 | { |
1736 | struct netiucv_priv *priv = dev->driver_data; | 1737 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1737 | 1738 | ||
1738 | IUCV_DBF_TEXT(trace, 4, __func__); | 1739 | IUCV_DBF_TEXT(trace, 4, __func__); |
1739 | priv->conn->prof.tx_pending = 0; | 1740 | priv->conn->prof.tx_pending = 0; |
@@ -1745,7 +1746,7 @@ static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write); | |||
1745 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | 1746 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, |
1746 | char *buf) | 1747 | char *buf) |
1747 | { | 1748 | { |
1748 | struct netiucv_priv *priv = dev->driver_data; | 1749 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1749 | 1750 | ||
1750 | IUCV_DBF_TEXT(trace, 5, __func__); | 1751 | IUCV_DBF_TEXT(trace, 5, __func__); |
1751 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); | 1752 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); |
@@ -1754,7 +1755,7 @@ static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | |||
1754 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, | 1755 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, |
1755 | const char *buf, size_t count) | 1756 | const char *buf, size_t count) |
1756 | { | 1757 | { |
1757 | struct netiucv_priv *priv = dev->driver_data; | 1758 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1758 | 1759 | ||
1759 | IUCV_DBF_TEXT(trace, 4, __func__); | 1760 | IUCV_DBF_TEXT(trace, 4, __func__); |
1760 | priv->conn->prof.tx_max_pending = 0; | 1761 | priv->conn->prof.tx_max_pending = 0; |
@@ -1845,7 +1846,7 @@ static int netiucv_register_device(struct net_device *ndev) | |||
1845 | if (ret) | 1846 | if (ret) |
1846 | goto out_unreg; | 1847 | goto out_unreg; |
1847 | priv->dev = dev; | 1848 | priv->dev = dev; |
1848 | dev->driver_data = priv; | 1849 | dev_set_drvdata(dev, priv); |
1849 | return 0; | 1850 | return 0; |
1850 | 1851 | ||
1851 | out_unreg: | 1852 | out_unreg: |