]> git.hungrycats.org Git - linux/commitdiff
[PATCH] designated initializer patches for
authorArt Haas <ahaas@neosoft.com>
Thu, 1 Aug 2002 05:23:13 +0000 (22:23 -0700)
committerChristoph Hellwig <hch@sb.bsdonline.org>
Thu, 1 Aug 2002 05:23:13 +0000 (22:23 -0700)
Here are patches for designated initializers in kernel/*.

kernel/futex.c
kernel/kmod.c
kernel/module.c
kernel/platform.c
kernel/sched.c
kernel/sys.c
kernel/sysctl.c
kernel/user.c

index dca7e1a84864e8067a9fbcc94cbf61c73a90ddb3..ef3dc8b00a5fc90ceb2828879fe0c0b720581518 100644 (file)
@@ -245,8 +245,8 @@ static unsigned int futex_poll(struct file *filp,
 }
 
 static struct file_operations futex_fops = {
-       release:        futex_close,
-       poll:           futex_poll,
+       .release        = futex_close,
+       .poll           = futex_poll,
 };
 
 /* Signal allows caller to avoid the race which would occur if they
@@ -357,8 +357,8 @@ futexfs_get_sb(struct file_system_type *fs_type,
 }
 
 static struct file_system_type futex_fs_type = {
-       name:           "futexfs",
-       get_sb:         futexfs_get_sb,
+       .name           = "futexfs",
+       .get_sb         = futexfs_get_sb,
 };
 
 static int __init init(void)
index d063d20001a46233ffefed346140098391382083..53dd3ca194c36a7479f0122d6626b6fb43fe48ba 100644 (file)
@@ -346,15 +346,15 @@ int call_usermodehelper(char *path, char **argv, char **envp)
 {
        DECLARE_COMPLETION(work);
        struct subprocess_info sub_info = {
-               complete:       &work,
-               path:           path,
-               argv:           argv,
-               envp:           envp,
-               retval:         0,
+               .complete       = &work,
+               .path           = path,
+               .argv           = argv,
+               .envp           = envp,
+               .retval         = 0,
        };
        struct tq_struct tqs = {
-               routine:        __call_usermodehelper,
-               data:           &sub_info,
+               .routine        = __call_usermodehelper,
+               .data           = &sub_info,
        };
 
        if (path[0] == '\0')
index 8d2f2a46de0e696c6acf4f2f7000280b7dd88a3f..b9e8e91909441f5038cc4aaf5ccb3a4918ae4ca3 100644 (file)
@@ -44,15 +44,15 @@ extern const char __stop___kallsyms[] __attribute__ ((weak));
 
 struct module kernel_module =
 {
-       size_of_struct:         sizeof(struct module),
-       name:                   "",
-       uc:                     {ATOMIC_INIT(1)},
-       flags:                  MOD_RUNNING,
-       syms:                   __start___ksymtab,
-       ex_table_start:         __start___ex_table,
-       ex_table_end:           __stop___ex_table,
-       kallsyms_start:         __start___kallsyms,
-       kallsyms_end:           __stop___kallsyms,
+       .size_of_struct         = sizeof(struct module),
+       .name                   = "",
+       .uc                     = {ATOMIC_INIT(1)},
+       .flags                  = MOD_RUNNING,
+       .syms                   = __start___ksymtab,
+       .ex_table_start         = __start___ex_table,
+       .ex_table_end           = __stop___ex_table,
+       .kallsyms_start         = __start___kallsyms,
+       .kallsyms_end           = __stop___kallsyms,
 };
 
 struct module *module_list = &kernel_module;
@@ -1132,10 +1132,10 @@ static int m_show(struct seq_file *m, void *p)
        return 0;
 }
 struct seq_operations modules_op = {
-       start:  m_start,
-       next:   m_next,
-       stop:   m_stop,
-       show:   m_show
+       .start  = m_start,
+       .next   = m_next,
+       .stop   = m_stop,
+       .show   = m_show
 };
 
 /*
@@ -1214,10 +1214,10 @@ static int s_show(struct seq_file *m, void *p)
 }
 
 struct seq_operations ksyms_op = {
-       start:  s_start,
-       next:   s_next,
-       stop:   s_stop,
-       show:   s_show
+       .start  = s_start,
+       .next   = s_next,
+       .stop   = s_stop,
+       .show   = s_show
 };
 
 #else          /* CONFIG_MODULES */
index 9848541526a6280626114afbe5227c91f09d5361..66eb41af168dcfa924953fa06f5bd04a68b1d83e 100644 (file)
@@ -23,13 +23,13 @@ int default_suspend(int state, int flags)
 }
 
 static struct platform_t default_platform = {
-       name:           "Default Platform",
-       suspend_states: 0,
-       reboot:         default_reboot,
-       halt:           default_halt,
-       power_off:      default_halt,
-       suspend:        default_suspend,
-       idle:           default_idle,
+       .name           = "Default Platform",
+       .suspend_states = 0,
+       .reboot         = default_reboot,
+       .halt           = default_halt,
+       .power_off      = default_halt,
+       .suspend        = default_suspend,
+       .idle           = default_idle,
 };
 
 struct platform_t * platform = &default_platform;
index 67ac32a24c1fc4d61aeda31dfedb7c4d935e933f..f90e63b8c1eccfc82e59c7963e3b4d791407db56 100644 (file)
@@ -1819,7 +1819,7 @@ out:
 static int migration_thread(void * bind_cpu)
 {
        int cpu = (int) (long) bind_cpu;
-       struct sched_param param = { sched_priority: MAX_RT_PRIO-1 };
+       struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
        runqueue_t *rq;
        int ret;
 
index 37a9525b3f1db850590219532d6dcbbc4dc428e9..316a63de74ea67e33efcf51cca288769887a8866 100644 (file)
@@ -391,7 +391,7 @@ static void deferred_cad(void *dummy)
 void ctrl_alt_del(void)
 {
        static struct tq_struct cad_tq = {
-               routine: deferred_cad,
+               .routine = deferred_cad,
        };
 
        if (C_A_D)
index 0c2c938efb65c557afa5e98f449d9e4d739c1b33..653210748e64ce5bc476c42764e71c2c1e71d3c5 100644 (file)
@@ -126,12 +126,12 @@ static ssize_t proc_writesys(struct file *, const char *, size_t, loff_t *);
 static int proc_sys_permission(struct inode *, int);
 
 struct file_operations proc_sys_file_operations = {
-       read:           proc_readsys,
-       write:          proc_writesys,
+       .read           = proc_readsys,
+       .write          = proc_writesys,
 };
 
 static struct inode_operations proc_sys_inode_operations = {
-       permission:     proc_sys_permission,
+       .permission     = proc_sys_permission,
 };
 
 extern struct proc_dir_entry *proc_sys_root;
index c77f52ea9cffde001732c66f9b917ba962595fc3..752cda29c965b7332eac8ad5398f21bec333f592 100644 (file)
@@ -28,9 +28,9 @@ static struct list_head uidhash_table[UIDHASH_SZ];
 static spinlock_t uidhash_lock = SPIN_LOCK_UNLOCKED;
 
 struct user_struct root_user = {
-       __count:        ATOMIC_INIT(1),
-       processes:      ATOMIC_INIT(1),
-       files:          ATOMIC_INIT(0)
+       .__count        = ATOMIC_INIT(1),
+       .processes      = ATOMIC_INIT(1),
+       .files          = ATOMIC_INIT(0)
 };
 
 /*