Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] name_to_dev_t warning fix

kernel/power/disk.c needs a declaration of name_to_dev_t() in scope. mount.h
seems like an appropriate choice.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andrew Morton and committed by
Linus Torvalds
d53d9f16 22a44279

+6 -3
+2
include/linux/mount.h
··· 12 12 #define _LINUX_MOUNT_H 13 13 #ifdef __KERNEL__ 14 14 15 + #include <linux/types.h> 15 16 #include <linux/list.h> 16 17 #include <linux/spinlock.h> 17 18 #include <asm/atomic.h> ··· 77 76 extern void mark_mounts_for_expiry(struct list_head *mounts); 78 77 79 78 extern spinlock_t vfsmount_lock; 79 + extern dev_t name_to_dev_t(char *name); 80 80 81 81 #endif 82 82 #endif /* _LINUX_MOUNT_H */
+1
init/do_mounts.c
··· 7 7 #include <linux/root_dev.h> 8 8 #include <linux/security.h> 9 9 #include <linux/delay.h> 10 + #include <linux/mount.h> 10 11 11 12 #include <linux/nfs_fs.h> 12 13 #include <linux/nfs_fs_sb.h>
-1
init/do_mounts.h
··· 9 9 #include <linux/major.h> 10 10 #include <linux/root_dev.h> 11 11 12 - dev_t name_to_dev_t(char *name); 13 12 void change_floppy(char *fmt, ...); 14 13 void mount_block_root(char *name, int flags); 15 14 void mount_root(void);
+2
kernel/power/disk.c
··· 16 16 #include <linux/device.h> 17 17 #include <linux/delay.h> 18 18 #include <linux/fs.h> 19 + #include <linux/mount.h> 20 + 19 21 #include "power.h" 20 22 21 23
+1 -2
kernel/power/swsusp.c
··· 63 63 #include <linux/console.h> 64 64 #include <linux/highmem.h> 65 65 #include <linux/bio.h> 66 + #include <linux/mount.h> 66 67 67 68 #include <asm/uaccess.h> 68 69 #include <asm/mmu_context.h> ··· 1260 1259 printk("\b\b\b\bdone\n"); 1261 1260 return error; 1262 1261 } 1263 - 1264 - extern dev_t name_to_dev_t(const char *line); 1265 1262 1266 1263 /** 1267 1264 * read_pagedir - Read page backup list pages from swap