aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/raw.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-08 01:19:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:51:59 -0500
commit38ca6c34d385f143027ff40dd271c61adcc9b23c (patch)
tree52ea3f801dcd128976d5c3d90cbb713ad35f587d /drivers/char/raw.c
parent01107d343076c34b9e1ce5d073292bd7f3097fda (diff)
Driver core: convert raw device code to use struct device
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/raw.c')
-rw-r--r--drivers/char/raw.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 89b718e326e5..3b32313f6eb4 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -127,9 +127,9 @@ raw_ioctl(struct inode *inode, struct file *filp,
127 127
128static void bind_device(struct raw_config_request *rq) 128static void bind_device(struct raw_config_request *rq)
129{ 129{
130 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); 130 device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
131 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), 131 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
132 NULL, "raw%d", rq->raw_minor); 132 "raw%d", rq->raw_minor);
133} 133}
134 134
135/* 135/*
@@ -200,7 +200,7 @@ static int raw_ctl_ioctl(struct inode *inode, struct file *filp,
200 if (rq.block_major == 0 && rq.block_minor == 0) { 200 if (rq.block_major == 0 && rq.block_minor == 0) {
201 /* unbind */ 201 /* unbind */
202 rawdev->binding = NULL; 202 rawdev->binding = NULL;
203 class_device_destroy(raw_class, 203 device_destroy(raw_class,
204 MKDEV(RAW_MAJOR, rq.raw_minor)); 204 MKDEV(RAW_MAJOR, rq.raw_minor));
205 } else { 205 } else {
206 rawdev->binding = bdget(dev); 206 rawdev->binding = bdget(dev);
@@ -283,7 +283,7 @@ static int __init raw_init(void)
283 ret = PTR_ERR(raw_class); 283 ret = PTR_ERR(raw_class);
284 goto error_region; 284 goto error_region;
285 } 285 }
286 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 286 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), "rawctl");
287 287
288 return 0; 288 return 0;
289 289
@@ -295,7 +295,7 @@ error:
295 295
296static void __exit raw_exit(void) 296static void __exit raw_exit(void)
297{ 297{
298 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); 298 device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
299 class_destroy(raw_class); 299 class_destroy(raw_class);
300 cdev_del(&raw_cdev); 300 cdev_del(&raw_cdev);
301 unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS); 301 unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS);