Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI / video: mark acpi_video_get_levels() inline

A recent patch added a stub function for acpi_video_get_levels when
CONFIG_ACPI_VIDEO is disabled. However, this is marked as 'static'
and causes a warning about an unused function whereever the header
gets included:

In file included from ../drivers/gpu/drm/radeon/radeon_acpi.c:28:0:
include/acpi/video.h:74:12: error: 'acpi_video_get_levels' defined but not used [-Werror=unused-function]

This makes the declaration 'static inline', which gets rid of the
warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 059500940def (ACPI/video: export acpi_video_get_levels)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Arnd Bergmann and committed by
Rafael J. Wysocki
e4f35c13 a3c89334

+1 -1
+1 -1
include/acpi/video.h
··· 71 71 { 72 72 return false; 73 73 } 74 - static int acpi_video_get_levels(struct acpi_device *device, 74 + static inline int acpi_video_get_levels(struct acpi_device *device, 75 75 struct acpi_video_device_brightness **dev_br) 76 76 { 77 77 return -ENODEV;