| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $) |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2007 Alexey Starikovskiy <astarikovskiy@suse.de> |
|---|
| 5 | 6 | * Copyright (c) 2005-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com> |
|---|
| 6 | 7 | * Copyright (c) 2005 Rich Townsend <rhdt@bartol.udel.edu> |
|---|
| 7 | | - * |
|---|
| 8 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or (at |
|---|
| 13 | | - * your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 16 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 18 | | - * General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 21 | 8 | */ |
|---|
| 22 | 9 | |
|---|
| 23 | 10 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 41 | 28 | #define ACPI_SBS_CLASS "sbs" |
|---|
| 42 | 29 | #define ACPI_AC_CLASS "ac_adapter" |
|---|
| 43 | 30 | #define ACPI_SBS_DEVICE_NAME "Smart Battery System" |
|---|
| 44 | | -#define ACPI_SBS_FILE_INFO "info" |
|---|
| 45 | | -#define ACPI_SBS_FILE_STATE "state" |
|---|
| 46 | | -#define ACPI_SBS_FILE_ALARM "alarm" |
|---|
| 47 | 31 | #define ACPI_BATTERY_DIR_NAME "BAT%i" |
|---|
| 48 | 32 | #define ACPI_AC_DIR_NAME "AC0" |
|---|
| 49 | 33 | |
|---|
| .. | .. |
|---|
| 382 | 366 | state_readers[i].mode, |
|---|
| 383 | 367 | ACPI_SBS_BATTERY, |
|---|
| 384 | 368 | state_readers[i].command, |
|---|
| 385 | | - (u8 *)battery + |
|---|
| 369 | + (u8 *)battery + |
|---|
| 386 | 370 | state_readers[i].offset); |
|---|
| 387 | 371 | if (result) |
|---|
| 388 | 372 | goto end; |
|---|