Messages in this thread Patch in this message | | | Date | Fri, 8 Oct 2004 11:36:11 -0700 | From | Stephen Hemminger <> | Subject | [PATCH] [TRIVIAL] register_chrdev_region, alloc_chrdev_region const char |
| |
A couple chrdev routines take a constant string and should be declared with const char *
diff -Nru a/fs/char_dev.c b/fs/char_dev.c --- a/fs/char_dev.c 2004-10-08 10:44:52 -07:00 +++ b/fs/char_dev.c 2004-10-08 10:44:52 -07:00 @@ -153,7 +153,7 @@ 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; dev_t to = from + count; @@ -178,7 +178,8 @@ 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; cd = __register_chrdev_region(0, baseminor, count, name); diff -Nru a/include/linux/fs.h b/include/linux/fs.h --- a/include/linux/fs.h 2004-10-08 10:44:52 -07:00 +++ b/include/linux/fs.h 2004-10-08 10:44:52 -07:00 @@ -1269,8 +1269,8 @@ extern void bd_release(struct block_device *); /* fs/char_dev.c */ -extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, char *); -extern int register_chrdev_region(dev_t, unsigned, char *); +extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); +extern int register_chrdev_region(dev_t, unsigned, const char *); extern int register_chrdev(unsigned int, const char *, struct file_operations *); extern int unregister_chrdev(unsigned int, const char *); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |