Staticize the legacy cpu devclasses and revert the name for the acpi_cpu
devclass. As pointed out by dfr@, devclasses don't have to share the same linkage if multiple drivers have the same name. Newbus should match the devclasses based on name and allocate non-conflicting unit numbers.
This commit is contained in:
parent
f154b03b25
commit
3045c8af3f
@ -279,7 +279,7 @@ static driver_t cpu_driver = {
|
||||
cpu_methods,
|
||||
1, /* no softc */
|
||||
};
|
||||
devclass_t cpu_devclass;
|
||||
static devclass_t cpu_devclass;
|
||||
DRIVER_MODULE(cpu, legacy, cpu_driver, cpu_devclass, 0, 0);
|
||||
|
||||
static device_t
|
||||
|
@ -203,8 +203,8 @@ static driver_t acpi_cpu_driver = {
|
||||
sizeof(struct acpi_cpu_softc),
|
||||
};
|
||||
|
||||
static devclass_t cpu_devclass;
|
||||
DRIVER_MODULE(cpu, acpi, acpi_cpu_driver, cpu_devclass, 0, 0);
|
||||
static devclass_t acpi_cpu_devclass;
|
||||
DRIVER_MODULE(cpu, acpi, acpi_cpu_driver, acpi_cpu_devclass, 0, 0);
|
||||
MODULE_DEPEND(cpu, acpi, 1, 1, 1);
|
||||
|
||||
static int
|
||||
@ -760,7 +760,7 @@ acpi_cpu_startup(void *arg)
|
||||
int count, i;
|
||||
|
||||
/* Get set of CPU devices */
|
||||
devclass_get_devices(cpu_devclass, &cpu_devices, &cpu_ndevices);
|
||||
devclass_get_devices(acpi_cpu_devclass, &cpu_devices, &cpu_ndevices);
|
||||
|
||||
/* Check for quirks via the first CPU device. */
|
||||
sc = device_get_softc(cpu_devices[0]);
|
||||
|
@ -300,7 +300,7 @@ static driver_t cpu_driver = {
|
||||
cpu_methods,
|
||||
1, /* no softc */
|
||||
};
|
||||
devclass_t cpu_devclass;
|
||||
static devclass_t cpu_devclass;
|
||||
DRIVER_MODULE(cpu, legacy, cpu_driver, cpu_devclass, 0, 0);
|
||||
|
||||
static device_t
|
||||
|
Loading…
Reference in New Issue
Block a user