Subject: [PATCH] [acpi video] Add helper to set _DOS value directly - For compatability with proc interface, though it doesn't seem safe to allow arbitrary combinations of values.. Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/video/bus-device.c | 8 ++++++++ drivers/acpi/drivers/video/video.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) applies-to: d0515a783c7becd5b2c91452da7a66ebbe3ff218 457be5b03669e2e5e4ff91e2ba5b0fbda6ed41f0 diff --git a/drivers/acpi/drivers/video/bus-device.c b/drivers/acpi/drivers/video/bus-device.c index 1f1245d..b7e48de 100644 --- a/drivers/acpi/drivers/video/bus-device.c +++ b/drivers/acpi/drivers/video/bus-device.c @@ -314,6 +314,14 @@ static int run_dos(struct acpi_video_bus return ret; } +int video_bus_dos_set(struct acpi_video_bus * vb, u32 value) +{ + if (value & ~0x0000000f) + return -EINVAL; + + return run_dos(vb, value & 0x03, (value & 0x04) >> 2); +} + int video_bus_enable(struct acpi_video_bus * vb) { diff --git a/drivers/acpi/drivers/video/video.h b/drivers/acpi/drivers/video/video.h index 0a2e430..90fbb57 100644 --- a/drivers/acpi/drivers/video/video.h +++ b/drivers/acpi/drivers/video/video.h @@ -44,3 +44,4 @@ extern int video_bus_init(struct acpi_vi extern int video_bus_enable(struct acpi_video_bus * vb); extern int video_bus_disable(struct acpi_video_bus * vb); extern int video_bus_set_post(struct acpi_video_bus * vb, u32 post); +extern int video_bus_dos_set(struct acpi_video_bus * vb, u32 value); --- 0.99.9.GIT