Skip to content

Commit

Permalink
acpi-video-detect: Move acpi_osi_is_win8 to osl.c
Browse files Browse the repository at this point in the history
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 <hdegoede@redhat.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Hans de Goede authored and Rafael J. Wysocki committed Jun 18, 2015
1 parent adc8bb8 commit a87878b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
7 changes: 0 additions & 7 deletions drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,6 @@ static inline int suspend_nvs_save(void) { return 0; }
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
-------------------------------------------------------------------------- */
Expand Down
6 changes: 6 additions & 0 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 0 additions & 6 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a87878b

Please sign in to comment.