Skip to content

Commit 65d78b8

Browse files
kilobytewsakernel
authored andcommitted
i2c: mlxbf: depend on ACPI; clean away ifdeffage
This fixes maybe_unused warnings/errors. According to a comment during device tree removal, only ACPI is supported, thus let's actually require it. Fixes: be18c5e ("i2c: mlxbf: remove device tree support") Signed-off-by: Adam Borowski <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent fdf23c6 commit 65d78b8

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

drivers/i2c/busses/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ config I2C_LPC2K
764764
config I2C_MLXBF
765765
tristate "Mellanox BlueField I2C controller"
766766
depends on MELLANOX_PLATFORM && ARM64
767+
depends on ACPI
767768
select I2C_SLAVE
768769
help
769770
Enabling this option will add I2C SMBus support for Mellanox BlueField

drivers/i2c/busses/i2c-mlxbf.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,6 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
22472247
.max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH,
22482248
};
22492249

2250-
#ifdef CONFIG_ACPI
22512250
static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
22522251
{ "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
22532252
{ "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
@@ -2282,12 +2281,6 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
22822281

22832282
return 0;
22842283
}
2285-
#else
2286-
static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
2287-
{
2288-
return -ENOENT;
2289-
}
2290-
#endif /* CONFIG_ACPI */
22912284

22922285
static int mlxbf_i2c_probe(struct platform_device *pdev)
22932286
{
@@ -2490,9 +2483,7 @@ static struct platform_driver mlxbf_i2c_driver = {
24902483
.remove = mlxbf_i2c_remove,
24912484
.driver = {
24922485
.name = "i2c-mlxbf",
2493-
#ifdef CONFIG_ACPI
24942486
.acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
2495-
#endif /* CONFIG_ACPI */
24962487
},
24972488
};
24982489

0 commit comments

Comments
 (0)