Skip to content

Commit

Permalink
Merge branches 'acpi-pnp' and 'pnp'
Browse files Browse the repository at this point in the history
* acpi-pnp:
  ACPI / PNP: constify device IDs

* pnp:
  PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching
  PNP: Add Broadwell to Intel MCH size workaround
  • Loading branch information
Rafael J. Wysocki committed Jan 12, 2016
3 parents 476cc43 + 38a234b + e0f03e8 commit 4c170ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static struct acpi_scan_handler acpi_pnp_handler = {
*/
static int is_cmos_rtc_device(struct acpi_device *adev)
{
struct acpi_device_id ids[] = {
static const struct acpi_device_id ids[] = {
{ "PNP0B00" },
{ "PNP0B01" },
{ "PNP0B02" },
Expand Down
6 changes: 5 additions & 1 deletion drivers/pnp/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ void pnp_device_detach(struct pnp_dev *pnp_dev)
if (pnp_dev->status == PNP_ATTACHED)
pnp_dev->status = PNP_READY;
mutex_unlock(&pnp_lock);
pnp_disable_dev(pnp_dev);
}

static int pnp_device_probe(struct device *dev)
Expand Down Expand Up @@ -131,6 +130,11 @@ static int pnp_device_remove(struct device *dev)
drv->remove(pnp_dev);
pnp_dev->driver = NULL;
}

if (pnp_dev->active &&
(!drv || !(drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)))
pnp_disable_dev(pnp_dev);

pnp_device_detach(pnp_dev);
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/pnp/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ static void quirk_amd_mmconfig_area(struct pnp_dev *dev)
static const unsigned int mch_quirk_devices[] = {
0x0154, /* Ivy Bridge */
0x0c00, /* Haswell */
0x1604, /* Broadwell */
};

static struct pci_dev *get_intel_host(void)
Expand Down

0 comments on commit 4c170ed

Please sign in to comment.