| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2013 Matthew Garrett <mjg59@srcf.ucam.org> |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 6 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 7 | | - * (at your option) any later version. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License along |
|---|
| 15 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 16 | | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 17 | 4 | */ |
|---|
| 18 | 5 | |
|---|
| 19 | | - |
|---|
| 20 | | -#include <linux/init.h> |
|---|
| 6 | +#include <linux/acpi.h> |
|---|
| 21 | 7 | #include <linux/module.h> |
|---|
| 22 | 8 | #include <linux/slab.h> |
|---|
| 23 | | -#include <linux/acpi.h> |
|---|
| 24 | 9 | |
|---|
| 25 | 10 | MODULE_LICENSE("GPL"); |
|---|
| 26 | 11 | |
|---|
| .. | .. |
|---|
| 53 | 38 | acpi = to_acpi_device(dev); |
|---|
| 54 | 39 | |
|---|
| 55 | 40 | error = kstrtoul(buf, 0, &value); |
|---|
| 56 | | - |
|---|
| 57 | 41 | if (error) |
|---|
| 58 | 42 | return error; |
|---|
| 59 | 43 | |
|---|
| 60 | 44 | status = acpi_execute_simple_method(acpi->handle, "SFFS", value); |
|---|
| 61 | | - |
|---|
| 62 | 45 | if (ACPI_FAILURE(status)) |
|---|
| 63 | 46 | return -EINVAL; |
|---|
| 64 | 47 | |
|---|
| .. | .. |
|---|
| 99 | 82 | acpi = to_acpi_device(dev); |
|---|
| 100 | 83 | |
|---|
| 101 | 84 | error = kstrtoul(buf, 0, &value); |
|---|
| 102 | | - |
|---|
| 103 | 85 | if (error) |
|---|
| 104 | 86 | return error; |
|---|
| 105 | 87 | |
|---|
| 106 | 88 | status = acpi_execute_simple_method(acpi->handle, "SFTV", value); |
|---|
| 107 | | - |
|---|
| 108 | 89 | if (ACPI_FAILURE(status)) |
|---|
| 109 | 90 | return -EINVAL; |
|---|
| 110 | 91 | |
|---|