Skip to content

Commit

Permalink
net: smsc911x: skip acpi_device_id table when !CONFIG_ACPI
Browse files Browse the repository at this point in the history
The driver can match via multiple methods.  Its acpi_device_id table is
referenced via ACPI_PTR() so it will be unused for !CONFIG_ACPI builds:

  drivers/net/ethernet/smsc/smsc911x.c:2652:36: warning:
    ‘smsc911x_acpi_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Krzysztof Kozlowski authored and David S. Miller committed Apr 5, 2021
1 parent d392ecd commit cc0626c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2649,11 +2649,13 @@ static const struct of_device_id smsc911x_dt_ids[] = {
MODULE_DEVICE_TABLE(of, smsc911x_dt_ids);
#endif

#ifdef CONFIG_ACPI
static const struct acpi_device_id smsc911x_acpi_match[] = {
{ "ARMH9118", 0 },
{ }
};
MODULE_DEVICE_TABLE(acpi, smsc911x_acpi_match);
#endif

static struct platform_driver smsc911x_driver = {
.probe = smsc911x_drv_probe,
Expand Down

0 comments on commit cc0626c

Please sign in to comment.