[PATCH 02/23] reimplement alloc_chrdev_region with register_chrdev_ids

From: Jim Cromie
Date: Thu May 19 2011 - 17:36:05 EST



Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
fs/char_dev.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/char_dev.c b/fs/char_dev.c
index 9149b7c..c1bbb9c 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -234,12 +234,8 @@ int __deprecated
alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count,
const char *name)
{
- struct char_device_struct *cd;
- cd = __register_chrdev_region(0, baseminor, count, name);
- if (IS_ERR(cd))
- return PTR_ERR(cd);
- *dev = MKDEV(cd->major, cd->baseminor);
- return 0;
+ *dev = MKDEV(0, baseminor);
+ return register_chrdev_ids(dev, count, name);
}

/**
--
1.7.4.4

--
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/