Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348505
b: refs/heads/master
c: 44d22e2
h: refs/heads/master
i:
  348503: e4c995e
v: v3
  • Loading branch information
Lans Zhang authored and Borislav Petkov committed Jan 7, 2013
1 parent 3ba6901 commit 7aa4ee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5445166384755adc39c772acccca87ad5747be52
refs/heads/master: 44d22e2404b3ce93a314654962d31acc8afcdd62
18 changes: 6 additions & 12 deletions trunk/drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,7 @@ static void edac_delete_csrow_objects(struct mem_ctl_info *mci)
device_remove_file(&csrow->dev,
dynamic_csrow_ce_count_attr[chan]);
}
put_device(&mci->csrows[i]->dev);
device_del(&mci->csrows[i]->dev);
device_unregister(&mci->csrows[i]->dev);
}
}
#endif
Expand Down Expand Up @@ -1055,11 +1054,9 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
struct dimm_info *dimm = mci->dimms[i];
if (dimm->nr_pages == 0)
continue;
put_device(&dimm->dev);
device_del(&dimm->dev);
device_unregister(&dimm->dev);
}
put_device(&mci->dev);
device_del(&mci->dev);
device_unregister(&mci->dev);
bus_unregister(&mci->bus);
kfree(mci->bus.name);
return err;
Expand All @@ -1086,16 +1083,14 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
if (dimm->nr_pages == 0)
continue;
edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev));
put_device(&dimm->dev);
device_del(&dimm->dev);
device_unregister(&dimm->dev);
}
}

void edac_unregister_sysfs(struct mem_ctl_info *mci)
{
edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev));
put_device(&mci->dev);
device_del(&mci->dev);
device_unregister(&mci->dev);
bus_unregister(&mci->bus);
kfree(mci->bus.name);
}
Expand Down Expand Up @@ -1159,7 +1154,6 @@ int __init edac_mc_sysfs_init(void)

void __exit edac_mc_sysfs_exit(void)
{
device_del(mci_pdev);
put_device(mci_pdev);
device_unregister(mci_pdev);
edac_put_sysfs_subsys();
}

0 comments on commit 7aa4ee8

Please sign in to comment.