From patchwork Wed Jun 10 13:01:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 6579211 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7C2E9C0020 for ; Wed, 10 Jun 2015 13:02:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4C29205F5 for ; Wed, 10 Jun 2015 13:02:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19F80205FC for ; Wed, 10 Jun 2015 13:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932613AbbFJNCF (ORCPT ); Wed, 10 Jun 2015 09:02:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933608AbbFJNB7 (ORCPT ); Wed, 10 Jun 2015 09:01:59 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 4CAA035010C; Wed, 10 Jun 2015 13:01:59 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-4-95.ams2.redhat.com [10.36.4.95]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5AD1YLA026315; Wed, 10 Jun 2015 09:01:55 -0400 From: Hans de Goede To: Darren Hart , "Rafael J. Wysocki" Cc: Ben Skeggs , Azael Avalos , Corentin Chary , Lee Chun-Yi , Cezary Jackiewicz , Matthew Garrett , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Ike Panhc , Anisse Astier , Mattia Dongili , Henrique de Moraes Holschuh , platform-driver-x86@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, acpi4asus-user@lists.sourceforge.net, dri-devel@lists.freedesktop.org, Aaron Lu , linux-acpi@vger.kernel.org, Hans de Goede Subject: [PATCH 05/32] acpi-video-detect: Move acpi_osi_is_win8 to osl.c Date: Wed, 10 Jun 2015 15:01:05 +0200 Message-Id: <1433941292-21530-6-git-send-email-hdegoede@redhat.com> In-Reply-To: <1433941292-21530-1-git-send-email-hdegoede@redhat.com> References: <1433941292-21530-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP acpi_osi_is_win8 needs access to acpi_gbl_osi_data which is not exported, so move it to osl.c. Alternatively we could export acpi_gbl_osi_data but that seems undesirable. This allows video_detect.c to be build as a module, besides that acpi_osi_is_win8() is something which does not really belong in video_detect.c in the first place. Signed-off-by: Hans de Goede --- drivers/acpi/internal.h | 7 ------- drivers/acpi/osl.c | 6 ++++++ drivers/acpi/video_detect.c | 6 ------ include/linux/acpi.h | 1 + 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index ba4a61e..c370676 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -182,13 +182,6 @@ static inline void suspend_nvs_restore(void) {} #endif /*-------------------------------------------------------------------------- - Video - -------------------------------------------------------------------------- */ -#if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) -bool acpi_osi_is_win8(void); -#endif - -/*-------------------------------------------------------------------------- Device properties -------------------------------------------------------------------------- */ void acpi_init_properties(struct acpi_device *adev); diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 7ccba39..b906deb 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1684,6 +1684,12 @@ int acpi_resources_are_enforced(void) } EXPORT_SYMBOL(acpi_resources_are_enforced); +bool acpi_osi_is_win8(void) +{ + return acpi_gbl_osi_data >= ACPI_OSI_WIN_8; +} +EXPORT_SYMBOL(acpi_osi_is_win8); + /* * Deallocate the memory for a spinlock. */ diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index aad5cf4..026376d 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -178,12 +178,6 @@ static void acpi_video_caps_check(void) acpi_video_get_capabilities(NULL); } -bool acpi_osi_is_win8(void) -{ - return acpi_gbl_osi_data >= ACPI_OSI_WIN_8; -} -EXPORT_SYMBOL(acpi_osi_is_win8); - /* Promote the vendor interface instead of the generic video module. * This function allow DMI blacklists to be implemented by externals * platform drivers instead of putting a big blacklist in video_detect.c diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 7cb3b0b..913a1c1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -266,6 +266,7 @@ static inline int acpi_video_backlight_support(void) extern int acpi_blacklisted(void); extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); extern void acpi_osi_setup(char *str); +extern bool acpi_osi_is_win8(void); #ifdef CONFIG_ACPI_NUMA int acpi_get_node(acpi_handle handle);