Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1499449imu; Mon, 5 Nov 2018 22:49:17 -0800 (PST) X-Google-Smtp-Source: AJdET5fRQZqloiZd9hA66XsK1YgZFRcvEaIi1G30U9zb7JNni8oDZwuOmJpojrZ+Axvtpe+yFMFG X-Received: by 2002:a17:902:7c94:: with SMTP id y20-v6mr24976686pll.218.1541486957705; Mon, 05 Nov 2018 22:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541486957; cv=none; d=google.com; s=arc-20160816; b=Vp7EjyCzQdqG/PnVJXOpSpjPJEbJ3rd70c+o7Co5+/ayi3zpQJnE8au5XkJn3DtYvR AgkXw3ZbWQUU3jSabmtEHV97bWpcAt5jXVFn3DZ7N1mYrBA2yOQ5FIGxgn1L6ExH0s1c T76uTsEdW52jQ3xRY6t9zjyBY4amx109xEl2QubUJxjt+egGlIahpmkyxOG/xIvv5gZ2 z3dbwwQE5UoRaUa2VOMgQ1RhlXP+OX1SrLfkYitELAccryFUzkq+YFIFTWTkujyJmh3e XTAqZEoz+WKI5J2tJcyuCoHaYzBtvpAbsmOIvYpqHJc2O1dtwicifUujvMPFLxWCjPh0 IdtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=fOaXCmWq5UnH/KVRX9QffT6YAaShWKABHmkPUTVn9MQ=; b=GUskfDeTqOm+pVnkSfN6cRVOhOY1ZfCM2Ee4fY/nsfVcOuOW1XT4qvdv+OhBL+LKNq TczVH3GPK9yA8OIwRIs7s+jDpZAX1b/SbK9+DBrPbmc0zonGs5CayL6aE6dJpnWVG9C+ MQm7eq4A3kfdLXsYrE+csj32MnvJ8AjoWj5TBmjuKYtdcc8sjbzJFaZyQR0vUy/Hj8OH F2oSvQt4iK61BxY3IOVI+OshmQ3WG8W4iyJiTu3XPYW8gUHxxggf5yqVG/OBuRaiOwYF 7LcfUkUPIVDnMPF+fxoIt6d7xVMoAgfTg62Y2ZJPFXX8/zXZDnh4L31zG/cC9+S1quZU 6sBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34-v6si2235698ple.218.2018.11.05.22.49.02; Mon, 05 Nov 2018 22:49:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387937AbeKFQLs (ORCPT + 99 others); Tue, 6 Nov 2018 11:11:48 -0500 Received: from out1.zte.com.cn ([202.103.147.172]:47592 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387813AbeKFQLm (ORCPT ); Tue, 6 Nov 2018 11:11:42 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id B91446C2DC1251479BC5; Tue, 6 Nov 2018 14:47:17 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wA66lAEJ044659; Tue, 6 Nov 2018 14:47:10 +0800 (GMT-8) (envelope-from peng.hao2@zte.com.cn) Received: from localhost.localdomain.localdomain ([10.74.120.59]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018110614472345-8886603 ; Tue, 6 Nov 2018 14:47:23 +0800 From: Peng Hao To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, gregkh@linuxfoundation.org, andy@infradead.org, dvhart@infradead.org Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, hutao@cn.fujitsu.com, linux-doc@vger.kernel.org, Peng Hao Subject: [PATCH V8 06/11] misc/pvpanic : grouping ACPI related stuff Date: Tue, 6 Nov 2018 22:57:17 +0800 Message-Id: <1541516242-98568-6-git-send-email-peng.hao2@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1541516242-98568-1-git-send-email-peng.hao2@zte.com.cn> References: <1541516242-98568-1-git-send-email-peng.hao2@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-11-06 14:47:23, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-11-06 14:47:05, Serialize complete at 2018-11-06 14:47:05 X-MAIL: mse01.zte.com.cn wA66lAEJ044659 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Grouping ACPI related stuff and make preparation to break the ACPI dependency w/o any functional change. Reviewed-by: Andy Shevchenko Signed-off-by: Peng Hao --- drivers/misc/pvpanic.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c index c7f62bd..a9676b7 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 "); 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 @@ .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) -- 1.8.3.1