Commit 40d79955 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

[PATCH] register_chrdev_region(), alloc_chrdev_region() const char

A couple chrdev routines take a constant string and should be declared with
const char *.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7b84ff7d
...@@ -153,7 +153,7 @@ __unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct) ...@@ -153,7 +153,7 @@ __unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct)
return cd; return cd;
} }
int register_chrdev_region(dev_t from, unsigned count, char *name) int register_chrdev_region(dev_t from, unsigned count, const char *name)
{ {
struct char_device_struct *cd; struct char_device_struct *cd;
dev_t to = from + count; dev_t to = from + count;
...@@ -178,7 +178,8 @@ int register_chrdev_region(dev_t from, unsigned count, char *name) ...@@ -178,7 +178,8 @@ int register_chrdev_region(dev_t from, unsigned count, char *name)
return PTR_ERR(cd); return PTR_ERR(cd);
} }
int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, char *name) int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count,
const char *name)
{ {
struct char_device_struct *cd; struct char_device_struct *cd;
cd = __register_chrdev_region(0, baseminor, count, name); cd = __register_chrdev_region(0, baseminor, count, name);
......
...@@ -1270,8 +1270,8 @@ extern int bd_claim(struct block_device *, void *); ...@@ -1270,8 +1270,8 @@ extern int bd_claim(struct block_device *, void *);
extern void bd_release(struct block_device *); extern void bd_release(struct block_device *);
/* fs/char_dev.c */ /* fs/char_dev.c */
extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, char *); extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
extern int register_chrdev_region(dev_t, unsigned, char *); extern int register_chrdev_region(dev_t, unsigned, const char *);
extern int register_chrdev(unsigned int, const char *, extern int register_chrdev(unsigned int, const char *,
struct file_operations *); struct file_operations *);
extern int unregister_chrdev(unsigned int, const char *); extern int unregister_chrdev(unsigned int, const char *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment