diff options
| -rw-r--r-- | drivers/edac/i7core_edac.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 19faeffac9dc..6bebf4d73f48 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
| @@ -1933,9 +1933,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev, | |||
| 1933 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", | 1933 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", |
| 1934 | __func__, mci, &i7core_dev->pdev[0]->dev); | 1934 | __func__, mci, &i7core_dev->pdev[0]->dev); |
| 1935 | 1935 | ||
| 1936 | /* record ptr to the generic device */ | ||
| 1937 | mci->dev = &i7core_dev->pdev[0]->dev; | ||
| 1938 | |||
| 1939 | pvt = mci->pvt_info; | 1936 | pvt = mci->pvt_info; |
| 1940 | memset(pvt, 0, sizeof(*pvt)); | 1937 | memset(pvt, 0, sizeof(*pvt)); |
| 1941 | 1938 | ||
| @@ -1954,21 +1951,22 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev, | |||
| 1954 | mci->dev_name = pci_name(i7core_dev->pdev[0]); | 1951 | mci->dev_name = pci_name(i7core_dev->pdev[0]); |
| 1955 | mci->ctl_page_to_phys = NULL; | 1952 | mci->ctl_page_to_phys = NULL; |
| 1956 | 1953 | ||
| 1957 | if (pvt->is_registered) | ||
| 1958 | mci->mc_driver_sysfs_attributes = i7core_sysfs_rdimm_attrs; | ||
| 1959 | else | ||
| 1960 | mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs; | ||
| 1961 | |||
| 1962 | /* Set the function pointer to an actual operation function */ | ||
| 1963 | mci->edac_check = i7core_check_error; | ||
| 1964 | |||
| 1965 | /* Store pci devices at mci for faster access */ | 1954 | /* Store pci devices at mci for faster access */ |
| 1966 | rc = mci_bind_devs(mci, i7core_dev); | 1955 | rc = mci_bind_devs(mci, i7core_dev); |
| 1967 | if (unlikely(rc < 0)) | 1956 | if (unlikely(rc < 0)) |
| 1968 | goto fail; | 1957 | goto fail; |
| 1969 | 1958 | ||
| 1959 | if (pvt->is_registered) | ||
| 1960 | mci->mc_driver_sysfs_attributes = i7core_sysfs_rdimm_attrs; | ||
| 1961 | else | ||
| 1962 | mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs; | ||
| 1963 | |||
| 1970 | /* Get dimm basic config */ | 1964 | /* Get dimm basic config */ |
| 1971 | get_dimm_config(mci, &csrow); | 1965 | get_dimm_config(mci, &csrow); |
| 1966 | /* record ptr to the generic device */ | ||
| 1967 | mci->dev = &i7core_dev->pdev[0]->dev; | ||
| 1968 | /* Set the function pointer to an actual operation function */ | ||
| 1969 | mci->edac_check = i7core_check_error; | ||
| 1972 | 1970 | ||
| 1973 | /* add this new MC control structure to EDAC's list of MCs */ | 1971 | /* add this new MC control structure to EDAC's list of MCs */ |
| 1974 | if (unlikely(edac_mc_add_mc(mci))) { | 1972 | if (unlikely(edac_mc_add_mc(mci))) { |
