Skip to content

Commit bf6067a

Browse files
andy-shevrafaeljw
authored andcommitted
ACPI: platform: Move SMB0001 HID to the header and reuse
There are at least two places in the kernel that are using the SMB0001 HID. Make it to be available via acpi_drivers.h header file. While at it, replace hard coded one with a definition. Reviewed-by: Andi Shyti <[email protected]> Acked-by: Wolfram Sang <[email protected]> # for I2C Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent cefbd80 commit bf6067a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

drivers/acpi/acpi_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static const struct acpi_device_id forbidden_id_list[] = {
2929
{"PNP0000", 0}, /* PIC */
3030
{"PNP0100", 0}, /* Timer */
3131
{"PNP0200", 0}, /* AT DMA Controller */
32-
{"SMB0001", ACPI_ALLOW_WO_RESOURCES}, /* ACPI SMBUS virtual device */
32+
{ACPI_SMBUS_MS_HID, ACPI_ALLOW_WO_RESOURCES}, /* ACPI SMBUS virtual device */
3333
{ }
3434
};
3535

drivers/i2c/busses/i2c-scmi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
#include <linux/i2c.h>
1414
#include <linux/acpi.h>
1515

16-
/* SMBUS HID definition as supported by Microsoft Windows */
17-
#define ACPI_SMBUS_MS_HID "SMB0001"
18-
1916
struct smbus_methods_t {
2017
char *mt_info;
2118
char *mt_sbr;

include/acpi/acpi_drivers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#define ACPI_BAY_HID "LNXIOBAY"
2828
#define ACPI_DOCK_HID "LNXDOCK"
2929
#define ACPI_ECDT_HID "LNXEC"
30+
/* SMBUS HID definition as supported by Microsoft Windows */
31+
#define ACPI_SMBUS_MS_HID "SMB0001"
3032
/* Quirk for broken IBM BIOSes */
3133
#define ACPI_SMBUS_IBM_HID "SMBUSIBM"
3234

0 commit comments

Comments
 (0)