Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108967407
D28031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28031.diff
View Options
Index: sys/dev/virtio/mmio/virtio_mmio.c
===================================================================
--- sys/dev/virtio/mmio/virtio_mmio.c
+++ sys/dev/virtio/mmio/virtio_mmio.c
@@ -166,7 +166,7 @@
DEVMETHOD_END
};
-DEFINE_CLASS_0(virtio_mmio, vtmmio_driver, vtmmio_methods,
+DEFINE_CLASS_0(virtio, vtmmio_driver, vtmmio_methods,
sizeof(struct vtmmio_softc));
MODULE_VERSION(virtio_mmio, 1);
Index: sys/dev/virtio/mmio/virtio_mmio_acpi.c
===================================================================
--- sys/dev/virtio/mmio/virtio_mmio_acpi.c
+++ sys/dev/virtio/mmio/virtio_mmio_acpi.c
@@ -62,7 +62,7 @@
DEVMETHOD_END
};
-DEFINE_CLASS_1(virtio_mmio, vtmmio_acpi_driver, vtmmio_acpi_methods,
+DEFINE_CLASS_1(virtio, vtmmio_acpi_driver, vtmmio_acpi_methods,
sizeof(struct vtmmio_softc), vtmmio_driver);
static devclass_t vtmmio_acpi_devclass;
Index: sys/dev/virtio/mmio/virtio_mmio_fdt.c
===================================================================
--- sys/dev/virtio/mmio/virtio_mmio_fdt.c
+++ sys/dev/virtio/mmio/virtio_mmio_fdt.c
@@ -76,7 +76,7 @@
DEVMETHOD_END
};
-DEFINE_CLASS_1(virtio_mmio, vtmmio_fdt_driver, vtmmio_fdt_methods,
+DEFINE_CLASS_1(virtio, vtmmio_fdt_driver, vtmmio_fdt_methods,
sizeof(struct vtmmio_softc), vtmmio_driver);
static devclass_t vtmmio_fdt_devclass;
Index: sys/dev/virtio/pci/virtio_pci.c
===================================================================
--- sys/dev/virtio/pci/virtio_pci.c
+++ sys/dev/virtio/pci/virtio_pci.c
@@ -233,11 +233,8 @@
DEVMETHOD_END
};
-static driver_t vtpci_driver = {
- "virtio_pci",
- vtpci_methods,
- sizeof(struct vtpci_softc)
-};
+DEFINE_CLASS_0(virtio, vtpci_driver, vtpci_methods,
+ sizeof(struct vtpci_softc));
devclass_t vtpci_devclass;
Index: sys/dev/virtio/virtio.h
===================================================================
--- sys/dev/virtio/virtio.h
+++ sys/dev/virtio/virtio.h
@@ -64,8 +64,7 @@
};
#define VIRTIO_DRIVER_MODULE(name, driver, devclass, evh, arg) \
- DRIVER_MODULE(name, virtio_mmio, driver, devclass, evh, arg); \
- DRIVER_MODULE(name, virtio_pci, driver, devclass, evh, arg)
+ DRIVER_MODULE(name, virtio, driver, devclass, evh, arg) \
struct virtio_pnp_match {
uint32_t device_type;
@@ -76,9 +75,7 @@
.device_type = devtype, \
.description = desc, \
}; \
- MODULE_PNP_INFO("U32:device_type;D:#", virtio_mmio, driver, \
- &driver ## _match, 1); \
- MODULE_PNP_INFO("U32:device_type;D:#", virtio_pci, driver, \
+ MODULE_PNP_INFO("U32:device_type;D:#", virtio, driver, \
&driver ## _match, 1)
#define VIRTIO_SIMPLE_PROBE(dev, driver) \
(virtio_simple_probe(dev, &driver ## _match))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 31, 2:30 AM (10 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16350984
Default Alt Text
D28031.diff (2 KB)
Attached To
Mode
D28031: virtio: Use a common class name between virtio_mmio and virtio_pci
Attached
Detach File
Event Timeline
Log In to Comment