Hi,

i think i saw this done similarly in some other driver, and thought why not,
but i'm unsure about the needs-flag in files.x?

-Artturi

diff --git a/sys/arch/arm64/dev/bcm2835_dwctwo.c 
b/sys/arch/arm64/dev/bcm2835_dwctwo.c
index d6cfe61fd2a..9242e9ea65e 100644
--- a/sys/arch/arm64/dev/bcm2835_dwctwo.c
+++ b/sys/arch/arm64/dev/bcm2835_dwctwo.c
@@ -52,10 +52,6 @@ const struct cfattach bcmdwctwo_ca = {
        sizeof(struct bcm_dwctwo_softc), bcm_dwctwo_match, bcm_dwctwo_attach,
 };
 
-struct cfdriver dwctwo_cd = {
-       NULL, "dwctwo", DV_DULL
-};
-
 static struct dwc2_core_params bcm_dwctwo_params = {
        .otg_cap                        = 0,    /* HNP/SRP capable */
        .otg_ver                        = 0,    /* 1.3 */
diff --git a/sys/arch/armv7/broadcom/bcm2835_dwctwo.c 
b/sys/arch/armv7/broadcom/bcm2835_dwctwo.c
index e49a5283cc5..34cb7728a4f 100644
--- a/sys/arch/armv7/broadcom/bcm2835_dwctwo.c
+++ b/sys/arch/armv7/broadcom/bcm2835_dwctwo.c
@@ -55,10 +55,6 @@ const struct cfattach bcmdwctwo_ca = {
        sizeof(struct bcm_dwctwo_softc), bcm_dwctwo_match, bcm_dwctwo_attach,
 };
 
-struct cfdriver dwctwo_cd = {
-       NULL, "dwctwo", DV_DULL
-};
-
 static struct dwc2_core_params bcm_dwctwo_params = {
        .otg_cap                        = 0,    /* HNP/SRP capable */
        .otg_ver                        = 0,    /* 1.3 */
diff --git a/sys/arch/octeon/dev/octdwctwo.c b/sys/arch/octeon/dev/octdwctwo.c
index cf8b797c4ff..144987b9309 100644
--- a/sys/arch/octeon/dev/octdwctwo.c
+++ b/sys/arch/octeon/dev/octdwctwo.c
@@ -69,10 +69,6 @@ const struct cfattach octdwctwo_ca = {
        sizeof(struct octdwctwo_softc), octdwctwo_match, octdwctwo_attach,
 };
 
-struct cfdriver dwctwo_cd = {
-       NULL, "dwctwo", DV_DULL
-};
-
 static struct dwc2_core_params octdwctwo_params = {
        .otg_cap = 2,
        .otg_ver = 0,
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index 1c0ccba0e25..879b9d01a82 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -163,6 +163,10 @@ dwc2_free_bus_bandwidth(struct dwc2_hsotg *hsotg, u16 bw,
 {
 }
 
+struct cfdriver dwctwo_cd = {
+       NULL, "dwctwo", DV_DULL
+};
+
 #define DWC2_INTR_ENDPT 1
 
 STATIC struct usbd_bus_methods dwc2_bus_methods = {

Reply via email to