diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-28 04:56:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:05 -0500 |
commit | 99ac48f54a91d02140c497edc31dc57d4bc5c85d (patch) | |
tree | 68719391694a6914191bdf73d2071875f7653f6f /fs/char_dev.c | |
parent | ec1b9466cb4f6ae6d950bd67055d9410d1056d2a (diff) |
[PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/char_dev.c')
-rw-r--r-- | fs/char_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c index 8c6eb04d31e2..b53dffa46bac 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c | |||
@@ -250,7 +250,7 @@ int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, | |||
250 | } | 250 | } |
251 | 251 | ||
252 | int register_chrdev(unsigned int major, const char *name, | 252 | int register_chrdev(unsigned int major, const char *name, |
253 | struct file_operations *fops) | 253 | const struct file_operations *fops) |
254 | { | 254 | { |
255 | struct char_device_struct *cd; | 255 | struct char_device_struct *cd; |
256 | struct cdev *cdev; | 256 | struct cdev *cdev; |
@@ -473,7 +473,7 @@ struct cdev *cdev_alloc(void) | |||
473 | return p; | 473 | return p; |
474 | } | 474 | } |
475 | 475 | ||
476 | void cdev_init(struct cdev *cdev, struct file_operations *fops) | 476 | void cdev_init(struct cdev *cdev, const struct file_operations *fops) |
477 | { | 477 | { |
478 | memset(cdev, 0, sizeof *cdev); | 478 | memset(cdev, 0, sizeof *cdev); |
479 | INIT_LIST_HEAD(&cdev->list); | 479 | INIT_LIST_HEAD(&cdev->list); |