EDAC, thunderx: Maintain platform device symlinks for LMC instances
From: Borislav Petkov <bp@alien8.de>
Date: 2017-06-01 18:06:02
On Wed, May 31, 2017 at 06:51:19PM +0300, Sergey Temerkhanov wrote:
quoted hunk
From: Sergey Temerkhanov <redacted> Maintain the device symlink for ThunderX LMC device instances the same way as it's done for generic EDAC devices Signed-off-by: Sergey Temerkhanov <redacted> --- drivers/edac/thunderx_edac.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)diff --git a/drivers/edac/thunderx_edac.c b/drivers/edac/thunderx_edac.c index 86d585cb6d32..67f95a3072f9 100644 --- a/drivers/edac/thunderx_edac.c +++ b/drivers/edac/thunderx_edac.c@@ -675,6 +675,8 @@ static inline int pci_dev_to_mc_idx(struct pci_dev *pdev) return ret; } +#define LMC_DEVICE_SYMLINK "device" + static int thunderx_lmc_probe(struct pci_dev *pdev, const struct pci_device_id *id) {@@ -793,6 +795,14 @@ static int thunderx_lmc_probe(struct pci_dev *pdev, goto err_free; } + ret = sysfs_create_link(&mci->dev.kobj, + &mci->pdev->kobj, LMC_DEVICE_SYMLINK);
Hmm, edac_device_add_device() -> edac_device_create_sysfs() already does that. And your ocx and l2c things do that. Why aren't you doing the same for the lmc?