Commit d90c008963ef638cb7ab7d5eb76362b3c2d379bc

Authored by Mauro Carvalho Chehab
1 parent 5c4cdb5ae7

edac: Get rid of the old kobj's from the edac mc code

Now that al users for the old kobj raw access are gone,
we can get rid of the legacy kobj-based structures and
data.

Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 4 changed files with 0 additions and 38 deletions Side-by-side Diff

drivers/edac/edac_mc.c
... ... @@ -372,7 +372,6 @@
372 372 }
373 373  
374 374 mci->op_state = OP_ALLOC;
375   - INIT_LIST_HEAD(&mci->grp_kobj_list);
376 375  
377 376 /* at this point, the root kobj is valid, and in order to
378 377 * 'free' the object, then the function:
drivers/edac/i5000_edac.c
... ... @@ -1406,7 +1406,6 @@
1406 1406 if (mci == NULL)
1407 1407 return -ENOMEM;
1408 1408  
1409   - kobject_get(&mci->edac_mci_kobj);
1410 1409 debugf0("MC: %s: %s(): mci = %p\n", __FILE__, __func__, mci);
1411 1410  
1412 1411 mci->pdev = &pdev->dev; /* record ptr to the generic device */
... ... @@ -1479,7 +1478,6 @@
1479 1478 i5000_put_devices(mci);
1480 1479  
1481 1480 fail0:
1482   - kobject_put(&mci->edac_mci_kobj);
1483 1481 edac_mc_free(mci);
1484 1482 return -ENODEV;
1485 1483 }
... ... @@ -1525,7 +1523,6 @@
1525 1523  
1526 1524 /* retrieve references to resources, and free those resources */
1527 1525 i5000_put_devices(mci);
1528   - kobject_put(&mci->edac_mci_kobj);
1529 1526 edac_mc_free(mci);
1530 1527 }
1531 1528  
drivers/edac/i82875p_edac.c
... ... @@ -426,9 +426,6 @@
426 426 goto fail0;
427 427 }
428 428  
429   - /* Keeps mci available after edac_mc_del_mc() till edac_mc_free() */
430   - kobject_get(&mci->edac_mci_kobj);
431   -
432 429 debugf3("%s(): init mci\n", __func__);
433 430 mci->pdev = &pdev->dev;
434 431 mci->mtype_cap = MEM_FLAG_DDR;
... ... @@ -471,7 +468,6 @@
471 468 return 0;
472 469  
473 470 fail1:
474   - kobject_put(&mci->edac_mci_kobj);
475 471 edac_mc_free(mci);
476 472  
477 473 fail0:
include/linux/edac.h
... ... @@ -457,7 +457,6 @@
457 457 /* Memory location data */
458 458 unsigned location[EDAC_MAX_LAYERS];
459 459  
460   - struct kobject kobj; /* sysfs kobject for this csrow */
461 460 struct mem_ctl_info *mci; /* the parent */
462 461  
463 462 u32 grain; /* granularity of reported error in bytes */
464 463  
... ... @@ -511,34 +510,11 @@
511 510  
512 511 struct mem_ctl_info *mci; /* the parent */
513 512  
514   - struct kobject kobj; /* sysfs kobject for this csrow */
515   -
516 513 /* channel information for this csrow */
517 514 u32 nr_channels;
518 515 struct rank_info *channels;
519 516 };
520 517  
521   -struct mcidev_sysfs_group {
522   - const char *name; /* group name */
523   - const struct mcidev_sysfs_attribute *mcidev_attr; /* group attributes */
524   -};
525   -
526   -/* mcidev_sysfs_attribute structure
527   - * used for driver sysfs attributes and in mem_ctl_info
528   - * sysfs top level entries
529   - */
530   -struct mcidev_sysfs_attribute {
531   - /* It should use either attr or grp */
532   - struct attribute attr;
533   - const struct mcidev_sysfs_group *grp; /* Points to a group of attributes */
534   -
535   - /* Ops for show/store values at the attribute - not used on group */
536   - ssize_t (*show)(struct mem_ctl_info *, char *);
537   - ssize_t (*store)(struct mem_ctl_info *, const char *, size_t);
538   -
539   - void *priv;
540   -};
541   -
542 518 /*
543 519 * struct errcount_attribute - used to store the several error counts
544 520 */
... ... @@ -640,12 +616,6 @@
640 616 u32 *ce_per_layer[EDAC_MAX_LAYERS], *ue_per_layer[EDAC_MAX_LAYERS];
641 617  
642 618 struct completion complete;
643   -
644   - /* edac sysfs device control */
645   - struct kobject edac_mci_kobj;
646   -
647   - /* list for all grp instances within a mc */
648   - struct list_head grp_kobj_list;
649 619  
650 620 /* Additional top controller level attributes, but specified
651 621 * by the low level driver.