OSDN Git Service

gpio: pch: Use .driver_data instead of checking Device IDs again
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 30 Nov 2021 22:08:37 +0000 (16:08 -0600)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 1 Dec 2021 13:10:25 +0000 (15:10 +0200)
commit82b2cd4c8caebf0b61b39daf5e0ed6be170a4ae1
tree38b65409427791ba35b8e5e9d9cca451d8e3dd82
parentbe3dc15ffe644d1b8bfae4a05eae3dc413a7c5e7
gpio: pch: Use .driver_data instead of checking Device IDs again

Previously, pch_gpio_probe() tested the Device ID to determine the type of
IOH.  But the driver core has already matched the Device ID with one of the
IDs in the pch_gpio_pcidev_id[] table, and we can supply the IOH type there
as .driver_data.

Use the pci_device_id.driver_data to learn the IOH type instead of testing
the Device ID again.

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-pch.c