[PATCH 14/36] Driver core: convert raw device code to use struct device
- From: Greg KH <greg@xxxxxxxxx>
- Date: Fri, 1 Dec 2006 15:21:44 -0800
From: Greg Kroah-Hartman <gregkh@xxxxxxx>
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@xxxxxxx>
---
drivers/char/raw.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 89b718e..3b32313 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -127,9 +127,9 @@ raw_ioctl(struct inode *inode, struct fi
static void bind_device(struct raw_config_request *rq)
{
- class_device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
- class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
- NULL, "raw%d", rq->raw_minor);
+ device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
+ device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
+ "raw%d", rq->raw_minor);
}
/*
@@ -200,7 +200,7 @@ static int raw_ctl_ioctl(struct inode *i
if (rq.block_major == 0 && rq.block_minor == 0) {
/* unbind */
rawdev->binding = NULL;
- class_device_destroy(raw_class,
+ device_destroy(raw_class,
MKDEV(RAW_MAJOR, rq.raw_minor));
} else {
rawdev->binding = bdget(dev);
@@ -283,7 +283,7 @@ static int __init raw_init(void)
ret = PTR_ERR(raw_class);
goto error_region;
}
- class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
+ device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), "rawctl");
return 0;
@@ -295,7 +295,7 @@ error:
static void __exit raw_exit(void)
{
- class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
+ device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
class_destroy(raw_class);
cdev_del(&raw_cdev);
unregister_chrdev_region(MKDEV(RAW_MAJOR, 0), MAX_RAW_MINORS);
--
1.4.4.1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [GIT PATCH] Driver core patches for 2.6.19
- From: Greg KH
- [PATCH 1/36] Driver core: add notification of bus events
- From: Greg KH
- [PATCH 2/36] Driver core: fix "driver" symlink timing
- From: Greg KH
- [PATCH 3/36] Driver Core: Move virtual_device_parent() to core.c
- From: Greg KH
- [PATCH 4/36] CONFIG_SYSFS_DEPRECATED
- From: Greg KH
- [PATCH 5/36] Driver core: make old versions of udev work properly
- From: Greg KH
- [PATCH 6/36] CONFIG_SYSFS_DEPRECATED - bus symlinks
- From: Greg KH
- [PATCH 7/36] CONFIG_SYSFS_DEPRECATED - device symlinks
- From: Greg KH
- [PATCH 8/36] CONFIG_SYSFS_DEPRECATED - PHYSDEV* uevent variables
- From: Greg KH
- [PATCH 9/36] CONFIG_SYSFS_DEPRECATED - class symlinks
- From: Greg KH
- [PATCH 10/36] Driver core: convert vt code to use struct device
- From: Greg KH
- [PATCH 11/36] Driver core: convert vc code to use struct device
- From: Greg KH
- [PATCH 12/36] Driver core: change misc class_devices to be real devices
- From: Greg KH
- [PATCH 13/36] Driver core: convert tty core to use struct device
- From: Greg KH
- [GIT PATCH] Driver core patches for 2.6.19
- Prev by Date: Re: [netfilter-core] [2.6 patch] net/*/nf_conntrack_*.c:possible cleanups
- Next by Date: [PATCH 30/36] driver core: Introduce device_find_child().
- Previous by thread: [PATCH 13/36] Driver core: convert tty core to use struct device
- Next by thread: [PATCH 15/36] I2C: convert i2c-dev to use struct device instead of struct class_device
- Index(es):
Relevant Pages
|