Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73f368cf679babef42e54f0fe19270040ac9d4d7
Commit:     73f368cf679babef42e54f0fe19270040ac9d4d7
Parent:     8dde2a96c146cc0491beec41fe3bf0477a1f15aa
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 15:54:39 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:29 2008 -0800

    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 <[EMAIL PROTECTED]>
    Cc: Matthew Wilcox <[EMAIL PROTECTED]>
    Cc: Grant Grundler <[EMAIL PROTECTED]>
    Cc: Kay Sievers <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/parisc/pdc_stable.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index 880b10b..87bc6b7 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -991,13 +991,12 @@ pdcs_register_pathentries(void)
                if (err < 0)
                        continue;
 
-               if ((err = kobject_set_name(&entry->kobj, "%s", entry->name)))
-                       return err;
                entry->kobj.kset = paths_kset;
-               entry->kobj.ktype = &ktype_pdcspath;
-               if ((err = kobject_register(&entry->kobj)))
+               err = kobject_init_and_add(&entry->kobj, &ktype_pdcspath, NULL,
+                                          "%s", entry->name);
+               if (err)
                        return err;
-               
+
                /* kobject is now registered */
                write_lock(&entry->rw_lock);
                entry->ready = 2;
@@ -1009,6 +1008,7 @@ pdcs_register_pathentries(void)
                }
 
                write_unlock(&entry->rw_lock);
+               kobject_uevent(&entry->kobj, KOBJ_ADD);
        }
        
        return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to