diff options
author | Peng Hao <peng.hao2@zte.com.cn> | 2018-11-06 22:57:17 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-07 13:53:04 +0100 |
commit | a8b71d2735791f09788a13dda928f690a417c14a (patch) | |
tree | ef10c3e7fda899698ac41e27f942a53ccab14755 /drivers/misc/pvpanic.c | |
parent | 46f934c9a12fc565fe2ae82c709162fa002a2998 (diff) |
misc/pvpanic : grouping ACPI related stuff
Grouping ACPI related stuff and make preparation to break
the ACPI dependency w/o any functional change.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/pvpanic.c')
-rw-r--r-- | drivers/misc/pvpanic.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c index fef76b5d5f0c..eabb53d077c5 100644 --- a/drivers/misc/pvpanic.c +++ b/drivers/misc/pvpanic.c @@ -32,32 +32,12 @@ static void __iomem *base; +#define PVPANIC_PANICKED (1 << 0) + MODULE_AUTHOR("Hu Tao <hutao@cn.fujitsu.com>"); MODULE_DESCRIPTION("pvpanic device driver"); MODULE_LICENSE("GPL"); -static int pvpanic_add(struct acpi_device *device); -static int pvpanic_remove(struct acpi_device *device); - -static const struct acpi_device_id pvpanic_device_ids[] = { - { "QEMU0001", 0 }, - { "", 0 }, -}; -MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids); - -#define PVPANIC_PANICKED (1 << 0) - -static struct acpi_driver pvpanic_driver = { - .name = "pvpanic", - .class = "QEMU", - .ids = pvpanic_device_ids, - .ops = { - .add = pvpanic_add, - .remove = pvpanic_remove, - }, - .owner = THIS_MODULE, -}; - static void pvpanic_send_event(unsigned int event) { @@ -77,6 +57,25 @@ static struct notifier_block pvpanic_panic_nb = { .priority = 1, /* let this called before broken drm_fb_helper */ }; +static int pvpanic_add(struct acpi_device *device); +static int pvpanic_remove(struct acpi_device *device); + +static const struct acpi_device_id pvpanic_device_ids[] = { + { "QEMU0001", 0 }, + { "", 0 }, +}; +MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids); + +static struct acpi_driver pvpanic_driver = { + .name = "pvpanic", + .class = "QEMU", + .ids = pvpanic_device_ids, + .ops = { + .add = pvpanic_add, + .remove = pvpanic_remove, + }, + .owner = THIS_MODULE, +}; static acpi_status pvpanic_walk_resources(struct acpi_resource *res, void *context) |