diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-10-22 06:52:42 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-10-22 06:52:48 -0400 |
commit | 7f021ce1957504cacc78896de857b90293badabc (patch) | |
tree | 7784c56c9887742c40e68a09c9855f29991f06e9 /drivers/s390/char/raw3270.c | |
parent | 5bf04b2062c5b441d7154216694fea7dc2a6a7f3 (diff) |
[S390] struct class_device -> struct device conversion.
Convert struct class_device users under drivers/s390/char to use
struct device.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/raw3270.c')
-rw-r--r-- | drivers/s390/char/raw3270.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 2edd5fb6d3dc..8d1c64a24dec 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -48,8 +48,8 @@ struct raw3270 { | |||
48 | struct timer_list timer; /* Device timer. */ | 48 | struct timer_list timer; /* Device timer. */ |
49 | 49 | ||
50 | unsigned char *ascebc; /* ascii -> ebcdic table */ | 50 | unsigned char *ascebc; /* ascii -> ebcdic table */ |
51 | struct class_device *clttydev; /* 3270-class tty device ptr */ | 51 | struct device *clttydev; /* 3270-class tty device ptr */ |
52 | struct class_device *cltubdev; /* 3270-class tub device ptr */ | 52 | struct device *cltubdev; /* 3270-class tub device ptr */ |
53 | 53 | ||
54 | struct raw3270_request init_request; | 54 | struct raw3270_request init_request; |
55 | unsigned char init_data[256]; | 55 | unsigned char init_data[256]; |
@@ -1107,11 +1107,9 @@ raw3270_delete_device(struct raw3270 *rp) | |||
1107 | /* Remove from device chain. */ | 1107 | /* Remove from device chain. */ |
1108 | mutex_lock(&raw3270_mutex); | 1108 | mutex_lock(&raw3270_mutex); |
1109 | if (rp->clttydev && !IS_ERR(rp->clttydev)) | 1109 | if (rp->clttydev && !IS_ERR(rp->clttydev)) |
1110 | class_device_destroy(class3270, | 1110 | device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); |
1111 | MKDEV(IBM_TTY3270_MAJOR, rp->minor)); | ||
1112 | if (rp->cltubdev && !IS_ERR(rp->cltubdev)) | 1111 | if (rp->cltubdev && !IS_ERR(rp->cltubdev)) |
1113 | class_device_destroy(class3270, | 1112 | device_destroy(class3270, MKDEV(IBM_FS3270_MAJOR, rp->minor)); |
1114 | MKDEV(IBM_FS3270_MAJOR, rp->minor)); | ||
1115 | list_del_init(&rp->list); | 1113 | list_del_init(&rp->list); |
1116 | mutex_unlock(&raw3270_mutex); | 1114 | mutex_unlock(&raw3270_mutex); |
1117 | 1115 | ||
@@ -1181,24 +1179,22 @@ static int raw3270_create_attributes(struct raw3270 *rp) | |||
1181 | if (rc) | 1179 | if (rc) |
1182 | goto out; | 1180 | goto out; |
1183 | 1181 | ||
1184 | rp->clttydev = class_device_create(class3270, NULL, | 1182 | rp->clttydev = device_create(class3270, &rp->cdev->dev, |
1185 | MKDEV(IBM_TTY3270_MAJOR, rp->minor), | 1183 | MKDEV(IBM_TTY3270_MAJOR, rp->minor), |
1186 | &rp->cdev->dev, "tty%s", | 1184 | "tty%s", rp->cdev->dev.bus_id); |
1187 | rp->cdev->dev.bus_id); | ||
1188 | if (IS_ERR(rp->clttydev)) { | 1185 | if (IS_ERR(rp->clttydev)) { |
1189 | rc = PTR_ERR(rp->clttydev); | 1186 | rc = PTR_ERR(rp->clttydev); |
1190 | goto out_ttydev; | 1187 | goto out_ttydev; |
1191 | } | 1188 | } |
1192 | 1189 | ||
1193 | rp->cltubdev = class_device_create(class3270, NULL, | 1190 | rp->cltubdev = device_create(class3270, &rp->cdev->dev, |
1194 | MKDEV(IBM_FS3270_MAJOR, rp->minor), | 1191 | MKDEV(IBM_FS3270_MAJOR, rp->minor), |
1195 | &rp->cdev->dev, "tub%s", | 1192 | "tub%s", rp->cdev->dev.bus_id); |
1196 | rp->cdev->dev.bus_id); | ||
1197 | if (!IS_ERR(rp->cltubdev)) | 1193 | if (!IS_ERR(rp->cltubdev)) |
1198 | goto out; | 1194 | goto out; |
1199 | 1195 | ||
1200 | rc = PTR_ERR(rp->cltubdev); | 1196 | rc = PTR_ERR(rp->cltubdev); |
1201 | class_device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); | 1197 | device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); |
1202 | 1198 | ||
1203 | out_ttydev: | 1199 | out_ttydev: |
1204 | sysfs_remove_group(&rp->cdev->dev.kobj, &raw3270_attr_group); | 1200 | sysfs_remove_group(&rp->cdev->dev.kobj, &raw3270_attr_group); |