diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 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; |