* [PATCH] Avoid unnecessary calls to sandybridge mce decoder on incompatible platform
@ 2013-03-29 22:13 Khalid Aziz
0 siblings, 0 replies; only message in thread
From: Khalid Aziz @ 2013-03-29 22:13 UTC (permalink / raw)
To: mchehab, dougthompson; +Cc: linux-edac, linux-kernel, khalid
Add MCE decoder to MCE decode chain in probe routine instead
of in init routine so that handler is not called unless the
driver is indeed running on SandyBridge.
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
---
drivers/edac/sb_edac.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 57244f9..6f05ffd 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1724,6 +1724,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto fail1;
}
+ mce_register_decode_chain(&sbridge_mce_dec);
sbridge_printk(KERN_INFO, "Driver loaded.\n");
mutex_unlock(&sbridge_edac_lock);
@@ -1803,10 +1804,8 @@ static int __init sbridge_init(void)
pci_rc = pci_register_driver(&sbridge_driver);
- if (pci_rc >= 0) {
- mce_register_decode_chain(&sbridge_mce_dec);
+ if (pci_rc >= 0)
return 0;
- }
sbridge_printk(KERN_ERR, "Failed to register device with error %d.\n",
pci_rc);
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-29 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 22:13 [PATCH] Avoid unnecessary calls to sandybridge mce decoder on incompatible platform Khalid Aziz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.