Skip to content

Commit

Permalink
ACPI / video: Dummy acpi_video_register should return error code
Browse files Browse the repository at this point in the history
The inline acpi_video_register stub simply allows compilation on systems
with CONFIG_ACPI_VIDEO disabled. the dummy acpi_video_register does not
register an acpi_bus_driver at all. The inline acpi_video_register should
return to indicate lack of support when attempting to register an
acpi_bus_driver on such a system with CONFIG_ACPI_VIDEO disabled.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Arvind Yadav authored and Rafael J. Wysocki committed Jun 25, 2016
1 parent e34fbba commit 0346223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/acpi/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern int acpi_video_get_levels(struct acpi_device *device,
struct acpi_video_device_brightness **dev_br,
int *pmax_level);
#else
static inline int acpi_video_register(void) { return 0; }
static inline int acpi_video_register(void) { return -ENODEV; }
static inline void acpi_video_unregister(void) { return; }
static inline int acpi_video_get_edid(struct acpi_device *device, int type,
int device_id, void **edid)
Expand Down

0 comments on commit 0346223

Please sign in to comment.