]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/edac/edac_mc_sysfs.c
Merge tag 'docs-5.6-fixes' of git://git.lwn.net/linux
[linux.git] / drivers / edac / edac_mc_sysfs.c
index 0367554e74374a4fbe11216985d1ec5733a04f32..c70ec0a306d8d47b312475894bc3b679780c3725 100644 (file)
@@ -276,10 +276,7 @@ static const struct attribute_group *csrow_attr_groups[] = {
 
 static void csrow_attr_release(struct device *dev)
 {
-       struct csrow_info *csrow = container_of(dev, struct csrow_info, dev);
-
-       edac_dbg(1, "device %s released\n", dev_name(dev));
-       kfree(csrow);
+       /* release device with _edac_mc_free() */
 }
 
 static const struct device_type csrow_attr_type = {
@@ -447,8 +444,7 @@ static int edac_create_csrow_objects(struct mem_ctl_info *mci)
                csrow = mci->csrows[i];
                if (!nr_pages_per_csrow(csrow))
                        continue;
-
-               device_del(&mci->csrows[i]->dev);
+               device_unregister(&mci->csrows[i]->dev);
        }
 
        return err;
@@ -608,10 +604,7 @@ static const struct attribute_group *dimm_attr_groups[] = {
 
 static void dimm_attr_release(struct device *dev)
 {
-       struct dimm_info *dimm = container_of(dev, struct dimm_info, dev);
-
-       edac_dbg(1, "device %s released\n", dev_name(dev));
-       kfree(dimm);
+       /* release device with _edac_mc_free() */
 }
 
 static const struct device_type dimm_attr_type = {
@@ -893,10 +886,7 @@ static const struct attribute_group *mci_attr_groups[] = {
 
 static void mci_attr_release(struct device *dev)
 {
-       struct mem_ctl_info *mci = container_of(dev, struct mem_ctl_info, dev);
-
-       edac_dbg(1, "device %s released\n", dev_name(dev));
-       kfree(mci);
+       /* release device with _edac_mc_free() */
 }
 
 static const struct device_type mci_attr_type = {