Module Name:    src
Committed By:   jdolecek
Date:           Sun Dec  9 10:06:56 UTC 2018

Modified Files:
        src/sys/dev/pci: if_ath_pci.c

Log Message:
use pci_intr_establish_xname()

upon code inspection, remove intr re-establish from ath_pci_resume() -
not needed to re-establish interrupt there, no other driver does this,
and very likely it would actually fail nowadays


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_ath_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ath_pci.c
diff -u src/sys/dev/pci/if_ath_pci.c:1.48 src/sys/dev/pci/if_ath_pci.c:1.49
--- src/sys/dev/pci/if_ath_pci.c:1.48	Sat Mar 29 19:28:24 2014
+++ src/sys/dev/pci/if_ath_pci.c	Sun Dec  9 10:06:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ath_pci.c,v 1.48 2014/03/29 19:28:24 christos Exp $	*/
+/*	$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.48 2014/03/29 19:28:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.49 2018/12/09 10:06:56 jdolecek Exp $");
 
 /*
  * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
@@ -137,12 +137,6 @@ ath_pci_resume(device_t self, const pmf_
 {
 	struct ath_pci_softc *sc = device_private(self);
 
-	sc->sc_ih = pci_intr_establish(sc->sc_pc, sc->sc_pih, IPL_NET, ath_intr,
-	    &sc->sc_sc);
-	if (sc->sc_ih == NULL) {
-		aprint_error_dev(self, "couldn't map interrupt\n");
-		return false;
-	}
 	return ath_resume(&sc->sc_sc);
 }
 
@@ -197,7 +191,8 @@ ath_pci_attach(device_t parent, device_t
 	}
 
 	intrstr = pci_intr_string(pc, psc->sc_pih, intrbuf, sizeof(intrbuf));
-	psc->sc_ih = pci_intr_establish(pc, psc->sc_pih, IPL_NET, ath_intr, sc);
+	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pih, IPL_NET,
+	    ath_intr, sc, device_xname(self));
 	if (psc->sc_ih == NULL) {
 		aprint_error("couldn't map interrupt\n");
 		goto bad1;

Reply via email to