ACPI / video: Dummy acpi_video_register should return error code
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 22 Jun 2016 18:56:01 +0000 (00:26 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 25 Jun 2016 00:56:59 +0000 (02:56 +0200)
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>
include/acpi/video.h

index 5731ccb42585b7d4a04c59487e4efb777e29d697..4536bd345ab462db5137be14a06d776cd5f6f85c 100644 (file)
@@ -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)