aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 14:54:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:29 -0500
commit73f368cf679babef42e54f0fe19270040ac9d4d7 (patch)
tree58dd289673022c20290265a7e2e6cef166c3010c /drivers/parisc
parent8dde2a96c146cc0491beec41fe3bf0477a1f15aa (diff)
Kobject: change drivers/parisc/pdc_stable.c to use kobject_init_and_add
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/pdc_stable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index 880b10b8a311..87bc6b73b249 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -991,13 +991,12 @@ pdcs_register_pathentries(void)
991 if (err < 0) 991 if (err < 0)
992 continue; 992 continue;
993 993
994 if ((err = kobject_set_name(&entry->kobj, "%s", entry->name)))
995 return err;
996 entry->kobj.kset = paths_kset; 994 entry->kobj.kset = paths_kset;
997 entry->kobj.ktype = &ktype_pdcspath; 995 err = kobject_init_and_add(&entry->kobj, &ktype_pdcspath, NULL,
998 if ((err = kobject_register(&entry->kobj))) 996 "%s", entry->name);
997 if (err)
999 return err; 998 return err;
1000 999
1001 /* kobject is now registered */ 1000 /* kobject is now registered */
1002 write_lock(&entry->rw_lock); 1001 write_lock(&entry->rw_lock);
1003 entry->ready = 2; 1002 entry->ready = 2;
@@ -1009,6 +1008,7 @@ pdcs_register_pathentries(void)
1009 } 1008 }
1010 1009
1011 write_unlock(&entry->rw_lock); 1010 write_unlock(&entry->rw_lock);
1011 kobject_uevent(&entry->kobj, KOBJ_ADD);
1012 } 1012 }
1013 1013
1014 return 0; 1014 return 0;