| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2012 Intel Corporation |
|---|
| 3 | 4 | * Author: Josh Triplett <josh@joshtriplett.org> |
|---|
| .. | .. |
|---|
| 5 | 6 | * Based on the bgrt driver: |
|---|
| 6 | 7 | * Copyright 2012 Red Hat, Inc <mjg@redhat.com> |
|---|
| 7 | 8 | * Author: Matthew Garrett |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 11 | | - * published by the Free Software Foundation. |
|---|
| 12 | 9 | */ |
|---|
| 13 | 10 | |
|---|
| 14 | 11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 45 | 42 | return; |
|---|
| 46 | 43 | } |
|---|
| 47 | 44 | *bgrt = *(struct acpi_table_bgrt *)table; |
|---|
| 48 | | - if (bgrt->version != 1) { |
|---|
| 45 | + /* |
|---|
| 46 | + * Only version 1 is defined but some older laptops (seen on Lenovo |
|---|
| 47 | + * Ivy Bridge models) have a correct version 1 BGRT table with the |
|---|
| 48 | + * version set to 0, so we accept version 0 and 1. |
|---|
| 49 | + */ |
|---|
| 50 | + if (bgrt->version > 1) { |
|---|
| 49 | 51 | pr_notice("Ignoring BGRT: invalid version %u (expected 1)\n", |
|---|
| 50 | 52 | bgrt->version); |
|---|
| 51 | 53 | goto out; |
|---|