RE: [PATCH V3 1/2] Xen stub driver for memory hotplug

From: Liu, Jinsong
Date: Thu Jan 24 2013 - 08:56:56 EST


>> +#include <linux/kernel.h>
>> +#include <linux/init.h>
>> +#include <linux/export.h>
>> +#include <linux/types.h>
>> +#include <linux/acpi.h>
>> +#include <acpi/acpi_drivers.h>
>> +#include <xen/acpi.h>
>> +
>> +/*--------------------------------------------
>> + stub driver for Xen memory hotplug
>> +--------------------------------------------*/
>> +
>> +#ifdef CONFIG_ACPI
>> +
>> +static const struct acpi_device_id memory_device_ids[] = {
>> + {ACPI_MEMORY_DEVICE_HID, 0},
>> + {"", 0},
>> +};
>> +
>> +struct acpi_driver xen_stub_memory_device_driver = {
>> + /* same name as native memory driver to block native loaded */
>> + .name = "acpi_memhotplug", + .class = ACPI_MEMORY_DEVICE_CLASS,
>> + .ids = memory_device_ids,
>> +};
>> +EXPORT_SYMBOL_GPL(xen_stub_memory_device_driver);
>
> Instead of having this, could you have a function that would
> unregister this if required.
>
> xen_stub_memory_device_uninit(void)
>
> which would unregister the above mentioned structure?
>

Yup, updated by EXPORT_SYMBOL_GPL 2 funcs:
xen_stub_memory_device_init()
xen_stub_memory_device_exit()

Thanks,
Jinsong--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/